Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1605778 > unrolled thread

[PATCH 0/3] dtc updates for 4.12

Started byRob Herring <robh@kernel.org>
First post2017-03-21 17:30 +0100
Last post2017-03-21 21:10 +0100
Articles 7 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] dtc updates for 4.12 Rob Herring <robh@kernel.org> - 2017-03-21 17:30 +0100
    [PATCH 3/3] dtc: update warning settings for new bus and node/property name checks Rob Herring <robh@kernel.org> - 2017-03-21 17:30 +0100
    [PATCH 1/3] scripts/dtc: automate getting dtc version and log in update script Rob Herring <robh@kernel.org> - 2017-03-21 17:30 +0100
    Re: [PATCH 0/3] dtc updates for 4.12 Florian Fainelli <f.fainelli@gmail.com> - 2017-03-21 18:00 +0100
      Re: [PATCH 0/3] dtc updates for 4.12 Rob Herring <robh@kernel.org> - 2017-03-21 20:40 +0100
    Re: [PATCH 0/3] dtc updates for 4.12 Olof Johansson <olof@lixom.net> - 2017-03-21 20:20 +0100
      Re: [PATCH 0/3] dtc updates for 4.12 Rob Herring <robh@kernel.org> - 2017-03-21 21:10 +0100

#1605778 — [PATCH 0/3] dtc updates for 4.12

FromRob Herring <robh@kernel.org>
Date2017-03-21 17:30 +0100
Subject[PATCH 0/3] dtc updates for 4.12
Message-ID<tnuPw-5O6-11@gated-at.bofh.it>
This series syncs dtc with current mainline. The primary motivation is 
to pull in the new checks I've worked on. This gives lots of new 
warnings which are turned off by default.

Arm-soc folks, I've left the PCI checks enabled as they are pretty much 
all real errors and there aren't that many (about 1200, but that's lots 
of duplicates). I have a patch for some of them.

Rob

Rob Herring (3):
  scripts/dtc: automate getting dtc version and log in update script
  scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6
  dtc: update warning settings for new bus and node/property name checks

 scripts/Makefile.lib                 |   9 +-
 scripts/dtc/checks.c                 | 361 +++++++++++++++++++++++++++++++----
 scripts/dtc/data.c                   |  16 +-
 scripts/dtc/dtc-lexer.l              |   3 +-
 scripts/dtc/dtc-lexer.lex.c_shipped  |  77 ++++----
 scripts/dtc/dtc-parser.tab.c_shipped |   6 +-
 scripts/dtc/dtc-parser.y             |   6 +-
 scripts/dtc/dtc.c                    |   9 +-
 scripts/dtc/dtc.h                    |  11 +-
 scripts/dtc/flattree.c               |  58 +++---
 scripts/dtc/libfdt/fdt_rw.c          |   3 +-
 scripts/dtc/libfdt/libfdt.h          |  51 ++++-
 scripts/dtc/libfdt/libfdt_env.h      |  26 +--
 scripts/dtc/livetree.c               |  22 ++-
 scripts/dtc/srcpos.c                 |   2 +-
 scripts/dtc/srcpos.h                 |  11 +-
 scripts/dtc/treesource.c             |   6 +-
 scripts/dtc/update-dtc-source.sh     |  20 +-
 scripts/dtc/util.c                   |  11 +-
 scripts/dtc/util.h                   |  24 ++-
 scripts/dtc/version_gen.h            |   2 +-
 21 files changed, 550 insertions(+), 184 deletions(-)

-- 
2.10.1

[toc] | [next] | [standalone]


#1605781 — [PATCH 3/3] dtc: update warning settings for new bus and node/property name checks

FromRob Herring <robh@kernel.org>
Date2017-03-21 17:30 +0100
Subject[PATCH 3/3] dtc: update warning settings for new bus and node/property name checks
Message-ID<tnuPw-5O6-25@gated-at.bofh.it>
In reply to#1605778
dtc gained new warnings checking PCI and simple buses, unit address
formatting, and stricter node and property name checking. Disable the
new dtc warnings by default as there are 1000s. As before warnings are
enabled with W=1 or W=2. The strict node and property name checks are a
bit subjective, so they are only enabled for W=2.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 scripts/Makefile.lib             | 9 ++++++++-
 scripts/dtc/update-dtc-source.sh | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0a07f9014944..9ded5cd4c68b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -280,7 +280,14 @@ DTC ?= $(objtree)/scripts/dtc/dtc
 
 # Disable noisy checks by default
 ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
-DTC_FLAGS += -Wno-unit_address_vs_reg
+DTC_FLAGS += -Wno-unit_address_vs_reg \
+	-Wno-simple_bus_reg \
+	-Wno-unit_address_format
+endif
+
+ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),2)
+DTC_FLAGS += -Wnode_name_chars_strict \
+	-Wproperty_name_chars_strict
 endif
 
 # Generate an assembly file to wrap the output of the device tree compiler
-- 
2.10.1

[toc] | [prev] | [next] | [standalone]


#1605782 — [PATCH 1/3] scripts/dtc: automate getting dtc version and log in update script

FromRob Herring <robh@kernel.org>
Date2017-03-21 17:30 +0100
Subject[PATCH 1/3] scripts/dtc: automate getting dtc version and log in update script
Message-ID<tnuPx-5O6-35@gated-at.bofh.it>
In reply to#1605778
Further automate the dtc update script to fill in the dtc version and
commit log.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 scripts/dtc/update-dtc-source.sh | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh
index f5cde799db03..c92e6bd9458d 100755
--- a/scripts/dtc/update-dtc-source.sh
+++ b/scripts/dtc/update-dtc-source.sh
@@ -36,10 +36,19 @@ DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c
 DTC_GENERATED="dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h"
 LIBFDT_SOURCE="Makefile.libfdt fdt.c fdt.h fdt_empty_tree.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c fdt_wip.c libfdt.h libfdt_env.h libfdt_internal.h"
 
+get_last_dtc_version() {
+	git log --oneline scripts/dtc/ | grep 'upstream' | head -1 | sed -e 's/^.* \(.*\)/\1/'
+}
+
+last_dtc_ver=$(get_last_dtc_version)
+
 # Build DTC
 cd $DTC_UPSTREAM_PATH
 make clean
 make check
+dtc_version=$(git describe HEAD)
+dtc_log=$(git log --oneline ${last_dtc_ver}..)
+
 
 # Copy the files into the Linux tree
 cd $DTC_LINUX_PATH
@@ -60,4 +69,12 @@ sed -i -- 's/#include <libfdt_env.h>/#include "libfdt_env.h"/g' ./libfdt/libfdt.
 sed -i -- 's/#include <fdt.h>/#include "fdt.h"/g' ./libfdt/libfdt.h
 git add ./libfdt/libfdt.h
 
-git commit -e -v -m "scripts/dtc: Update to upstream version [CHANGEME]"
+commit_msg=$(cat << EOF
+scripts/dtc: Update to upstream version ${dtc_version}
+
+This adds the following commits from upstream:
+
+${dtc_log}
+EOF
+)
+git commit -e -v -s -m "${commit_msg}"
-- 
2.10.1

[toc] | [prev] | [next] | [standalone]


#1605820

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2017-03-21 18:00 +0100
Message-ID<tnviy-5Yp-29@gated-at.bofh.it>
In reply to#1605778
On 03/21/2017 09:19 AM, Rob Herring wrote:
> This series syncs dtc with current mainline. The primary motivation is 
> to pull in the new checks I've worked on. This gives lots of new 
> warnings which are turned off by default.
> 
> Arm-soc folks, I've left the PCI checks enabled as they are pretty much 
> all real errors and there aren't that many (about 1200, but that's lots 
> of duplicates). I have a patch for some of them.

Out of curiosity, should we think about making dtc a git submodule and
have some magic in scripts/update-dtc-source.sh to sync it to a desired
commit?

> 
> Rob
> 
> Rob Herring (3):
>   scripts/dtc: automate getting dtc version and log in update script
>   scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6
>   dtc: update warning settings for new bus and node/property name checks
> 
>  scripts/Makefile.lib                 |   9 +-
>  scripts/dtc/checks.c                 | 361 +++++++++++++++++++++++++++++++----
>  scripts/dtc/data.c                   |  16 +-
>  scripts/dtc/dtc-lexer.l              |   3 +-
>  scripts/dtc/dtc-lexer.lex.c_shipped  |  77 ++++----
>  scripts/dtc/dtc-parser.tab.c_shipped |   6 +-
>  scripts/dtc/dtc-parser.y             |   6 +-
>  scripts/dtc/dtc.c                    |   9 +-
>  scripts/dtc/dtc.h                    |  11 +-
>  scripts/dtc/flattree.c               |  58 +++---
>  scripts/dtc/libfdt/fdt_rw.c          |   3 +-
>  scripts/dtc/libfdt/libfdt.h          |  51 ++++-
>  scripts/dtc/libfdt/libfdt_env.h      |  26 +--
>  scripts/dtc/livetree.c               |  22 ++-
>  scripts/dtc/srcpos.c                 |   2 +-
>  scripts/dtc/srcpos.h                 |  11 +-
>  scripts/dtc/treesource.c             |   6 +-
>  scripts/dtc/update-dtc-source.sh     |  20 +-
>  scripts/dtc/util.c                   |  11 +-
>  scripts/dtc/util.h                   |  24 ++-
>  scripts/dtc/version_gen.h            |   2 +-
>  21 files changed, 550 insertions(+), 184 deletions(-)
> 


-- 
Florian

[toc] | [prev] | [next] | [standalone]


#1605946

FromRob Herring <robh@kernel.org>
Date2017-03-21 20:40 +0100
Message-ID<tnxNo-7LG-25@gated-at.bofh.it>
In reply to#1605820
On Tue, Mar 21, 2017 at 11:49 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> On 03/21/2017 09:19 AM, Rob Herring wrote:
>> This series syncs dtc with current mainline. The primary motivation is
>> to pull in the new checks I've worked on. This gives lots of new
>> warnings which are turned off by default.
>>
>> Arm-soc folks, I've left the PCI checks enabled as they are pretty much
>> all real errors and there aren't that many (about 1200, but that's lots
>> of duplicates). I have a patch for some of them.
>
> Out of curiosity, should we think about making dtc a git submodule and
> have some magic in scripts/update-dtc-source.sh to sync it to a desired
> commit?

I'd be fine with that though all of dtc is not imported and I don't
really want to be the first to try to add a git submodule to the
kernel. Not everyone is a fan I think.

Rob

[toc] | [prev] | [next] | [standalone]


#1605925

FromOlof Johansson <olof@lixom.net>
Date2017-03-21 20:20 +0100
Message-ID<tnxu1-7Db-9@gated-at.bofh.it>
In reply to#1605778
On Tue, Mar 21, 2017 at 9:19 AM, Rob Herring <robh@kernel.org> wrote:
> This series syncs dtc with current mainline. The primary motivation is
> to pull in the new checks I've worked on. This gives lots of new
> warnings which are turned off by default.
>
> Arm-soc folks, I've left the PCI checks enabled as they are pretty much
> all real errors and there aren't that many (about 1200, but that's lots
> of duplicates). I have a patch for some of them.

Yay for better warnings!

But as with all changes of this kind, when new warnings are introduced
please give people some time to remove them without turning them on by
default. We had a cycle like that already.

Main reason is that it becomes too hard to spot new warnings when they
come in if the logs are flooded with 1200 existing warnings.

How many of them do you have patches for, per chance? If we can see
them show up quickly the answer to the above might be a bit different.


-Olof

[toc] | [prev] | [next] | [standalone]


#1605968

FromRob Herring <robh@kernel.org>
Date2017-03-21 21:10 +0100
Message-ID<tnygp-8eX-11@gated-at.bofh.it>
In reply to#1605925
On Tue, Mar 21, 2017 at 2:15 PM, Olof Johansson <olof@lixom.net> wrote:
> On Tue, Mar 21, 2017 at 9:19 AM, Rob Herring <robh@kernel.org> wrote:
>> This series syncs dtc with current mainline. The primary motivation is
>> to pull in the new checks I've worked on. This gives lots of new
>> warnings which are turned off by default.
>>
>> Arm-soc folks, I've left the PCI checks enabled as they are pretty much
>> all real errors and there aren't that many (about 1200, but that's lots
>> of duplicates). I have a patch for some of them.
>
> Yay for better warnings!
>
> But as with all changes of this kind, when new warnings are introduced
> please give people some time to remove them without turning them on by
> default. We had a cycle like that already.

Which I quickly fixed and learned my lesson. That's why I tried
getting this out earlier as well.

> Main reason is that it becomes too hard to spot new warnings when they
> come in if the logs are flooded with 1200 existing warnings.

Yeah. Since almost everything is an include, the warnings really multiply.

> How many of them do you have patches for, per chance? If we can see
> them show up quickly the answer to the above might be a bit different.

Okay, I lied or lost them... It looks like it is 79 unique warnings
for arm. I'll take a stab at fixing them.

Rob

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web