diff options
Diffstat (limited to 'scripts')
30 files changed, 118 insertions, 300 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index e2de6c4dce90..85d758233483 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0 | ||
| 1 | #### | 2 | #### |
| 2 | # kbuild: Generic definitions | 3 | # kbuild: Generic definitions |
| 3 | 4 | ||
diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py index 8cd16c65d3c5..00a10a293f4f 100755 --- a/scripts/checkkconfigsymbols.py +++ b/scripts/checkkconfigsymbols.py | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #!/usr/bin/env python3 | 1 | #!/usr/bin/env python3 |
| 2 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 2 | 3 | ||
| 3 | """Find Kconfig symbols that are referenced but not defined.""" | 4 | """Find Kconfig symbols that are referenced but not defined.""" |
| 4 | 5 | ||
| 5 | # (c) 2014-2017 Valentin Rothberg <valentinrothberg@gmail.com> | 6 | # (c) 2014-2017 Valentin Rothberg <valentinrothberg@gmail.com> |
| 6 | # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> | 7 | # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> |
| 7 | # | 8 | # |
| 8 | # Licensed under the terms of the GNU GPL License version 2 | ||
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | import argparse | 11 | import argparse |
diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c index 4834e44b37b2..1ae7a54d4f12 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c | |||
| @@ -1,21 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2007. | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2007. |
| 3 | * | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License as | ||
| 7 | * published by the Free Software Foundation; either version 2 of the | ||
| 8 | * License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 18 | * USA | ||
| 19 | */ | 4 | */ |
| 20 | 5 | ||
| 21 | #include "dtc.h" | 6 | #include "dtc.h" |
diff --git a/scripts/dtc/data.c b/scripts/dtc/data.c index 4a204145cc7b..0a43b6de3264 100644 --- a/scripts/dtc/data.c +++ b/scripts/dtc/data.c | |||
| @@ -1,21 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
| 3 | * | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License as | ||
| 7 | * published by the Free Software Foundation; either version 2 of the | ||
| 8 | * License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 18 | * USA | ||
| 19 | */ | 4 | */ |
| 20 | 5 | ||
| 21 | #include "dtc.h" | 6 | #include "dtc.h" |
diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c index 695e1f789fc7..bdb3f5945699 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c | |||
| @@ -1,21 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
| 3 | * | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License as | ||
| 7 | * published by the Free Software Foundation; either version 2 of the | ||
| 8 | * License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 18 | * USA | ||
| 19 | */ | 4 | */ |
| 20 | 5 | ||
| 21 | #include <sys/stat.h> | 6 | #include <sys/stat.h> |
diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h index 789e0b1bc057..357b878607ca 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h | |||
| @@ -1,24 +1,9 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
| 1 | #ifndef DTC_H | 2 | #ifndef DTC_H |
| 2 | #define DTC_H | 3 | #define DTC_H |
| 3 | 4 | ||
| 4 | /* | 5 | /* |
| 5 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. | 6 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
| 6 | * | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License as | ||
| 10 | * published by the Free Software Foundation; either version 2 of the | ||
| 11 | * License, or (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 16 | * General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 21 | * USA | ||
| 22 | */ | 7 | */ |
| 23 | 8 | ||
| 24 | #include <stdio.h> | 9 | #include <stdio.h> |
diff --git a/scripts/dtc/fdtget.c b/scripts/dtc/fdtget.c index c2fbab2a5476..c922f82246c6 100644 --- a/scripts/dtc/fdtget.c +++ b/scripts/dtc/fdtget.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 3 | * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 3 | * | 4 | * |
| @@ -6,21 +7,6 @@ | |||
| 6 | * Based on code written by: | 7 | * Based on code written by: |
| 7 | * Pantelis Antoniou <pantelis.antoniou@gmail.com> and | 8 | * Pantelis Antoniou <pantelis.antoniou@gmail.com> and |
| 8 | * Matthew McClintock <msm@freescale.com> | 9 | * Matthew McClintock <msm@freescale.com> |
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License as | ||
| 12 | * published by the Free Software Foundation; either version 2 of | ||
| 13 | * the License, or (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | * GNU General Public License for more details. | ||
| 19 | * | ||
| 20 | * You should have received a copy of the GNU General Public License | ||
| 21 | * along with this program; if not, write to the Free Software | ||
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
| 23 | * MA 02111-1307 USA | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #include <assert.h> | 12 | #include <assert.h> |
diff --git a/scripts/dtc/fdtput.c b/scripts/dtc/fdtput.c index f2197f51930b..a363c3cabc59 100644 --- a/scripts/dtc/fdtput.c +++ b/scripts/dtc/fdtput.c | |||
| @@ -1,20 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 3 | * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License as | ||
| 6 | * published by the Free Software Foundation; either version 2 of | ||
| 7 | * the License, or (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
| 17 | * MA 02111-1307 USA | ||
| 18 | */ | 4 | */ |
| 19 | 5 | ||
| 20 | #include <assert.h> | 6 | #include <assert.h> |
diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c index acf04c30669f..65705a3c7ce1 100644 --- a/scripts/dtc/flattree.c +++ b/scripts/dtc/flattree.c | |||
| @@ -1,21 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
| 3 | * | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License as | ||
| 7 | * published by the Free Software Foundation; either version 2 of the | ||
| 8 | * License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 18 | * USA | ||
| 19 | */ | 4 | */ |
| 20 | 5 | ||
| 21 | #include "dtc.h" | 6 | #include "dtc.h" |
diff --git a/scripts/dtc/fstree.c b/scripts/dtc/fstree.c index 1e7eeba47ff6..9871689b4afb 100644 --- a/scripts/dtc/fstree.c +++ b/scripts/dtc/fstree.c | |||
| @@ -1,21 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
| 3 | * | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License as | ||
| 7 | * published by the Free Software Foundation; either version 2 of the | ||
| 8 | * License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 18 | * USA | ||
| 19 | */ | 4 | */ |
| 20 | 5 | ||
| 21 | #include "dtc.h" | 6 | #include "dtc.h" |
diff --git a/scripts/dtc/livetree.c b/scripts/dtc/livetree.c index 7a2e6446a17b..3275231d396b 100644 --- a/scripts/dtc/livetree.c +++ b/scripts/dtc/livetree.c | |||
| @@ -1,21 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
| 3 | * | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License as | ||
| 7 | * published by the Free Software Foundation; either version 2 of the | ||
| 8 | * License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 18 | * USA | ||
| 19 | */ | 4 | */ |
| 20 | 5 | ||
| 21 | #include "dtc.h" | 6 | #include "dtc.h" |
diff --git a/scripts/dtc/srcpos.c b/scripts/dtc/srcpos.c index 41f83700ee91..f5205fb9c1ff 100644 --- a/scripts/dtc/srcpos.c +++ b/scripts/dtc/srcpos.c | |||
| @@ -1,20 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc. | 3 | * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc. |
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License as | ||
| 6 | * published by the Free Software Foundation; either version 2 of the | ||
| 7 | * License, or (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 12 | * General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 17 | * USA | ||
| 18 | */ | 4 | */ |
| 19 | 5 | ||
| 20 | #define _GNU_SOURCE | 6 | #define _GNU_SOURCE |
diff --git a/scripts/dtc/srcpos.h b/scripts/dtc/srcpos.h index 6326a952c40e..4318d7ad34d9 100644 --- a/scripts/dtc/srcpos.h +++ b/scripts/dtc/srcpos.h | |||
| @@ -1,20 +1,6 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc. | 3 | * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc. |
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License as | ||
| 6 | * published by the Free Software Foundation; either version 2 of the | ||
| 7 | * License, or (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 12 | * General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 17 | * USA | ||
| 18 | */ | 4 | */ |
| 19 | 5 | ||
| 20 | #ifndef SRCPOS_H | 6 | #ifndef SRCPOS_H |
diff --git a/scripts/dtc/treesource.c b/scripts/dtc/treesource.c index 1af36628b75f..c9d980c8abfc 100644 --- a/scripts/dtc/treesource.c +++ b/scripts/dtc/treesource.c | |||
| @@ -1,21 +1,6 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
| 3 | * | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License as | ||
| 7 | * published by the Free Software Foundation; either version 2 of the | ||
| 8 | * License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 18 | * USA | ||
| 19 | */ | 4 | */ |
| 20 | 5 | ||
| 21 | #include "dtc.h" | 6 | #include "dtc.h" |
diff --git a/scripts/dtc/util.c b/scripts/dtc/util.c index 9c6fb5f286ae..48af961dcc8c 100644 --- a/scripts/dtc/util.c +++ b/scripts/dtc/util.c | |||
| @@ -1,24 +1,10 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright 2011 The Chromium Authors, All Rights Reserved. | 3 | * Copyright 2011 The Chromium Authors, All Rights Reserved. |
| 3 | * Copyright 2008 Jon Loeliger, Freescale Semiconductor, Inc. | 4 | * Copyright 2008 Jon Loeliger, Freescale Semiconductor, Inc. |
| 4 | * | 5 | * |
| 5 | * util_is_printable_string contributed by | 6 | * util_is_printable_string contributed by |
| 6 | * Pantelis Antoniou <pantelis.antoniou AT gmail.com> | 7 | * Pantelis Antoniou <pantelis.antoniou AT gmail.com> |
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License as | ||
| 10 | * published by the Free Software Foundation; either version 2 of the | ||
| 11 | * License, or (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 16 | * General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 21 | * USA | ||
| 22 | */ | 8 | */ |
| 23 | 9 | ||
| 24 | #include <ctype.h> | 10 | #include <ctype.h> |
diff --git a/scripts/dtc/util.h b/scripts/dtc/util.h index 7658781a6200..11a5614591b1 100644 --- a/scripts/dtc/util.h +++ b/scripts/dtc/util.h | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
| 1 | #ifndef UTIL_H | 2 | #ifndef UTIL_H |
| 2 | #define UTIL_H | 3 | #define UTIL_H |
| 3 | 4 | ||
| @@ -8,21 +9,6 @@ | |||
| 8 | /* | 9 | /* |
| 9 | * Copyright 2011 The Chromium Authors, All Rights Reserved. | 10 | * Copyright 2011 The Chromium Authors, All Rights Reserved. |
| 10 | * Copyright 2008 Jon Loeliger, Freescale Semiconductor, Inc. | 11 | * Copyright 2008 Jon Loeliger, Freescale Semiconductor, Inc. |
| 11 | * | ||
| 12 | * This program is free software; you can redistribute it and/or | ||
| 13 | * modify it under the terms of the GNU General Public License as | ||
| 14 | * published by the Free Software Foundation; either version 2 of the | ||
| 15 | * License, or (at your option) any later version. | ||
| 16 | * | ||
| 17 | * This program is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 20 | * General Public License for more details. | ||
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License | ||
| 23 | * along with this program; if not, write to the Free Software | ||
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 25 | * USA | ||
| 26 | */ | 12 | */ |
| 27 | 13 | ||
| 28 | #ifdef __GNUC__ | 14 | #ifdef __GNUC__ |
diff --git a/scripts/dtc/yamltree.c b/scripts/dtc/yamltree.c index a00285a5a9ec..5b6ea8ea862f 100644 --- a/scripts/dtc/yamltree.c +++ b/scripts/dtc/yamltree.c | |||
| @@ -1,22 +1,8 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * (C) Copyright Linaro, Ltd. 2018 | 3 | * (C) Copyright Linaro, Ltd. 2018 |
| 3 | * (C) Copyright Arm Holdings. 2017 | 4 | * (C) Copyright Arm Holdings. 2017 |
| 4 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. | 5 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License as | ||
| 8 | * published by the Free Software Foundation; either version 2 of the | ||
| 9 | * License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 19 | * USA | ||
| 20 | */ | 6 | */ |
| 21 | 7 | ||
| 22 | #include <stdlib.h> | 8 | #include <stdlib.h> |
diff --git a/scripts/export_report.pl b/scripts/export_report.pl index 68ff426b347c..0f604f62f067 100755 --- a/scripts/export_report.pl +++ b/scripts/export_report.pl | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/usr/bin/env perl | 1 | #!/usr/bin/env perl |
| 2 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 2 | # | 3 | # |
| 3 | # (C) Copyright IBM Corporation 2006. | 4 | # (C) Copyright IBM Corporation 2006. |
| 4 | # Released under GPL v2. | ||
| 5 | # Author : Ram Pai (linuxram@us.ibm.com) | 5 | # Author : Ram Pai (linuxram@us.ibm.com) |
| 6 | # | 6 | # |
| 7 | # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c | 7 | # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c |
diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h index 552d5efd7cb7..17f06079a712 100644 --- a/scripts/gcc-plugins/gcc-common.h +++ b/scripts/gcc-plugins/gcc-common.h | |||
| @@ -150,8 +150,12 @@ void print_gimple_expr(FILE *, gimple, int, int); | |||
| 150 | void dump_gimple_stmt(pretty_printer *, gimple, int, int); | 150 | void dump_gimple_stmt(pretty_printer *, gimple, int, int); |
| 151 | #endif | 151 | #endif |
| 152 | 152 | ||
| 153 | #ifndef __unused | ||
| 153 | #define __unused __attribute__((__unused__)) | 154 | #define __unused __attribute__((__unused__)) |
| 155 | #endif | ||
| 156 | #ifndef __visible | ||
| 154 | #define __visible __attribute__((visibility("default"))) | 157 | #define __visible __attribute__((visibility("default"))) |
| 158 | #endif | ||
| 155 | 159 | ||
| 156 | #define DECL_NAME_POINTER(node) IDENTIFIER_POINTER(DECL_NAME(node)) | 160 | #define DECL_NAME_POINTER(node) IDENTIFIER_POINTER(DECL_NAME(node)) |
| 157 | #define DECL_NAME_LENGTH(node) IDENTIFIER_LENGTH(DECL_NAME(node)) | 161 | #define DECL_NAME_LENGTH(node) IDENTIFIER_LENGTH(DECL_NAME(node)) |
diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in index 1d73083da6cb..2efbec6b6b8d 100644 --- a/scripts/gdb/linux/constants.py.in +++ b/scripts/gdb/linux/constants.py.in | |||
| @@ -40,7 +40,8 @@ | |||
| 40 | import gdb | 40 | import gdb |
| 41 | 41 | ||
| 42 | /* linux/clk-provider.h */ | 42 | /* linux/clk-provider.h */ |
| 43 | LX_GDBPARSED(CLK_GET_RATE_NOCACHE) | 43 | if IS_BUILTIN(CONFIG_COMMON_CLK): |
| 44 | LX_GDBPARSED(CLK_GET_RATE_NOCACHE) | ||
| 44 | 45 | ||
| 45 | /* linux/fs.h */ | 46 | /* linux/fs.h */ |
| 46 | LX_VALUE(SB_RDONLY) | 47 | LX_VALUE(SB_RDONLY) |
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index e007840f45b9..23eff234184f 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* Generate kernel symbol version hashes. | 2 | /* Generate kernel symbol version hashes. |
| 2 | Copyright 1996, 1997 Linux International. | 3 | Copyright 1996, 1997 Linux International. |
| 3 | 4 | ||
| @@ -7,19 +8,7 @@ | |||
| 7 | This file was part of the Linux modutils 2.4.22: moved back into the | 8 | This file was part of the Linux modutils 2.4.22: moved back into the |
| 8 | kernel sources by Rusty Russell/Kai Germaschewski. | 9 | kernel sources by Rusty Russell/Kai Germaschewski. |
| 9 | 10 | ||
| 10 | This program is free software; you can redistribute it and/or modify it | 11 | */ |
| 11 | under the terms of the GNU General Public License as published by the | ||
| 12 | Free Software Foundation; either version 2 of the License, or (at your | ||
| 13 | option) any later version. | ||
| 14 | |||
| 15 | This program is distributed in the hope that it will be useful, but | ||
| 16 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 18 | General Public License for more details. | ||
| 19 | |||
| 20 | You should have received a copy of the GNU General Public License | ||
| 21 | along with this program; if not, write to the Free Software Foundation, | ||
| 22 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | ||
| 23 | 12 | ||
| 24 | #include <stdio.h> | 13 | #include <stdio.h> |
| 25 | #include <string.h> | 14 | #include <string.h> |
diff --git a/scripts/genksyms/genksyms.h b/scripts/genksyms/genksyms.h index b724a0290c75..2bcdb9bebab4 100644 --- a/scripts/genksyms/genksyms.h +++ b/scripts/genksyms/genksyms.h | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
| 1 | /* Generate kernel symbol version hashes. | 2 | /* Generate kernel symbol version hashes. |
| 2 | Copyright 1996, 1997 Linux International. | 3 | Copyright 1996, 1997 Linux International. |
| 3 | 4 | ||
| @@ -6,19 +7,7 @@ | |||
| 6 | 7 | ||
| 7 | This file is part of the Linux modutils. | 8 | This file is part of the Linux modutils. |
| 8 | 9 | ||
| 9 | This program is free software; you can redistribute it and/or modify it | 10 | */ |
| 10 | under the terms of the GNU General Public License as published by the | ||
| 11 | Free Software Foundation; either version 2 of the License, or (at your | ||
| 12 | option) any later version. | ||
| 13 | |||
| 14 | This program is distributed in the hope that it will be useful, but | ||
| 15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 17 | General Public License for more details. | ||
| 18 | |||
| 19 | You should have received a copy of the GNU General Public License | ||
| 20 | along with this program; if not, write to the Free Software Foundation, | ||
| 21 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | ||
| 22 | 11 | ||
| 23 | #ifndef MODUTILS_GENKSYMS_H | 12 | #ifndef MODUTILS_GENKSYMS_H |
| 24 | #define MODUTILS_GENKSYMS_H 1 | 13 | #define MODUTILS_GENKSYMS_H 1 |
diff --git a/scripts/gfp-translate b/scripts/gfp-translate index c9230e158a8f..b2ce416d944b 100755 --- a/scripts/gfp-translate +++ b/scripts/gfp-translate | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 2 | # Translate the bits making up a GFP mask | 3 | # Translate the bits making up a GFP mask |
| 3 | # (c) 2009, Mel Gorman <mel@csn.ul.ie> | 4 | # (c) 2009, Mel Gorman <mel@csn.ul.ie> |
| 4 | # Licensed under the terms of the GNU GPL License version 2 | ||
| 5 | SOURCE= | 5 | SOURCE= |
| 6 | GFPMASK=none | 6 | GFPMASK=none |
| 7 | 7 | ||
diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl index ef9e5b2a1614..b2d8b8aa2d99 100755 --- a/scripts/leaking_addresses.pl +++ b/scripts/leaking_addresses.pl | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/usr/bin/env perl | 1 | #!/usr/bin/env perl |
| 2 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 2 | # | 3 | # |
| 3 | # (c) 2017 Tobin C. Harding <me@tobin.cc> | 4 | # (c) 2017 Tobin C. Harding <me@tobin.cc> |
| 4 | # Licensed under the terms of the GNU GPL License version 2 | ||
| 5 | # | 5 | # |
| 6 | # leaking_addresses.pl: Scan the kernel for potential leaking addresses. | 6 | # leaking_addresses.pl: Scan the kernel for potential leaking addresses. |
| 7 | # - Scans dmesg output. | 7 | # - Scans dmesg output. |
diff --git a/scripts/objdiff b/scripts/objdiff index 4fb5d6796893..72b0b63c3fe1 100755 --- a/scripts/objdiff +++ b/scripts/objdiff | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 2 | 3 | ||
| 3 | # objdiff - a small script for validating that a commit or series of commits | 4 | # objdiff - a small script for validating that a commit or series of commits |
| 4 | # didn't change object code. | 5 | # didn't change object code. |
| 5 | # | 6 | # |
| 6 | # Copyright 2014, Jason Cooper <jason@lakedaemon.net> | 7 | # Copyright 2014, Jason Cooper <jason@lakedaemon.net> |
| 7 | # | 8 | # |
| 8 | # Licensed under the terms of the GNU GPL version 2 | ||
| 9 | 9 | ||
| 10 | # usage example: | 10 | # usage example: |
| 11 | # | 11 | # |
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index d24759214efd..3f77a5d695c1 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #!/usr/bin/env perl | 1 | #!/usr/bin/env perl |
| 2 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 2 | # (c) 2008, Steven Rostedt <srostedt@redhat.com> | 3 | # (c) 2008, Steven Rostedt <srostedt@redhat.com> |
| 3 | # Licensed under the terms of the GNU GPL License version 2 | ||
| 4 | # | 4 | # |
| 5 | # recordmcount.pl - makes a section called __mcount_loc that holds | 5 | # recordmcount.pl - makes a section called __mcount_loc that holds |
| 6 | # all the offsets to the calls to mcount. | 6 | # all the offsets to the calls to mcount. |
diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c index 18fd6143888b..576d11a60417 100644 --- a/scripts/selinux/mdp/mdp.c +++ b/scripts/selinux/mdp/mdp.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * | 3 | * |
| 3 | * mdp - make dummy policy | 4 | * mdp - make dummy policy |
| @@ -5,20 +6,6 @@ | |||
| 5 | * When pointed at a kernel tree, builds a dummy policy for that kernel | 6 | * When pointed at a kernel tree, builds a dummy policy for that kernel |
| 6 | * with exactly one type with full rights to itself. | 7 | * with exactly one type with full rights to itself. |
| 7 | * | 8 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 21 | * | ||
| 22 | * Copyright (C) IBM Corporation, 2006 | 9 | * Copyright (C) IBM Corporation, 2006 |
| 23 | * | 10 | * |
| 24 | * Authors: Serge E. Hallyn <serue@us.ibm.com> | 11 | * Authors: Serge E. Hallyn <serue@us.ibm.com> |
diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py index 33df646618e2..6374e078a5f2 100755 --- a/scripts/spdxcheck.py +++ b/scripts/spdxcheck.py | |||
| @@ -32,7 +32,8 @@ class SPDXdata(object): | |||
| 32 | def read_spdxdata(repo): | 32 | def read_spdxdata(repo): |
| 33 | 33 | ||
| 34 | # The subdirectories of LICENSES in the kernel source | 34 | # The subdirectories of LICENSES in the kernel source |
| 35 | license_dirs = [ "preferred", "deprecated", "exceptions", "dual" ] | 35 | # Note: exceptions needs to be parsed as last directory. |
| 36 | license_dirs = [ "preferred", "dual", "deprecated", "exceptions" ] | ||
| 36 | lictree = repo.head.commit.tree['LICENSES'] | 37 | lictree = repo.head.commit.tree['LICENSES'] |
| 37 | 38 | ||
| 38 | spdx = SPDXdata() | 39 | spdx = SPDXdata() |
| @@ -58,13 +59,13 @@ def read_spdxdata(repo): | |||
| 58 | elif l.startswith('SPDX-Licenses:'): | 59 | elif l.startswith('SPDX-Licenses:'): |
| 59 | for lic in l.split(':')[1].upper().strip().replace(' ', '').replace('\t', '').split(','): | 60 | for lic in l.split(':')[1].upper().strip().replace(' ', '').replace('\t', '').split(','): |
| 60 | if not lic in spdx.licenses: | 61 | if not lic in spdx.licenses: |
| 61 | raise SPDXException(None, 'Exception %s missing license %s' %(ex, lic)) | 62 | raise SPDXException(None, 'Exception %s missing license %s' %(exception, lic)) |
| 62 | spdx.exceptions[exception].append(lic) | 63 | spdx.exceptions[exception].append(lic) |
| 63 | 64 | ||
| 64 | elif l.startswith("License-Text:"): | 65 | elif l.startswith("License-Text:"): |
| 65 | if exception: | 66 | if exception: |
| 66 | if not len(spdx.exceptions[exception]): | 67 | if not len(spdx.exceptions[exception]): |
| 67 | raise SPDXException(el, 'Exception %s is missing SPDX-Licenses' %excid) | 68 | raise SPDXException(el, 'Exception %s is missing SPDX-Licenses' %exception) |
| 68 | spdx.exception_files += 1 | 69 | spdx.exception_files += 1 |
| 69 | else: | 70 | else: |
| 70 | spdx.license_files += 1 | 71 | spdx.license_files += 1 |
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index f6a5c0bae31e..9be208db88d3 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install | |||
| @@ -1,19 +1,11 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl |
| 2 | # SPDX-License-Identifier: GPL-2.0-or-later | ||
| 2 | use strict; | 3 | use strict; |
| 3 | 4 | ||
| 4 | # Copyright (c) 2017 Mauro Carvalho Chehab <mchehab@kernel.org> | 5 | # Copyright (c) 2017 Mauro Carvalho Chehab <mchehab@kernel.org> |
| 5 | # | 6 | # |
| 6 | # This program is free software; you can redistribute it and/or | ||
| 7 | # modify it under the terms of the GNU General Public License | ||
| 8 | # as published by the Free Software Foundation; either version 2 | ||
| 9 | # of the License, or (at your option) any later version. | ||
| 10 | # | ||
| 11 | # This program is distributed in the hope that it will be useful, | ||
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | # GNU General Public License for more details. | ||
| 15 | 7 | ||
| 16 | my $virtenv_dir = "sphinx_1.4"; | 8 | my $conf = "Documentation/conf.py"; |
| 17 | my $requirement_file = "Documentation/sphinx/requirements.txt"; | 9 | my $requirement_file = "Documentation/sphinx/requirements.txt"; |
| 18 | 10 | ||
| 19 | # | 11 | # |
| @@ -26,7 +18,9 @@ my $need = 0; | |||
| 26 | my $optional = 0; | 18 | my $optional = 0; |
| 27 | my $need_symlink = 0; | 19 | my $need_symlink = 0; |
| 28 | my $need_sphinx = 0; | 20 | my $need_sphinx = 0; |
| 21 | my $rec_sphinx_upgrade = 0; | ||
| 29 | my $install = ""; | 22 | my $install = ""; |
| 23 | my $virtenv_dir = "sphinx_"; | ||
| 30 | 24 | ||
| 31 | # | 25 | # |
| 32 | # Command line arguments | 26 | # Command line arguments |
| @@ -201,13 +195,15 @@ sub check_missing_tex($) | |||
| 201 | } | 195 | } |
| 202 | } | 196 | } |
| 203 | 197 | ||
| 204 | sub check_sphinx() | 198 | sub get_sphinx_fname() |
| 205 | { | 199 | { |
| 206 | return if findprog("sphinx-build"); | 200 | my $fname = "sphinx-build"; |
| 201 | return $fname if findprog($fname); | ||
| 207 | 202 | ||
| 208 | if (findprog("sphinx-build-3")) { | 203 | $fname = "sphinx-build-3"; |
| 204 | if (findprog($fname)) { | ||
| 209 | $need_symlink = 1; | 205 | $need_symlink = 1; |
| 210 | return; | 206 | return $fname; |
| 211 | } | 207 | } |
| 212 | 208 | ||
| 213 | if ($virtualenv) { | 209 | if ($virtualenv) { |
| @@ -219,6 +215,73 @@ sub check_sphinx() | |||
| 219 | } else { | 215 | } else { |
| 220 | add_package("python-sphinx", 0); | 216 | add_package("python-sphinx", 0); |
| 221 | } | 217 | } |
| 218 | |||
| 219 | return ""; | ||
| 220 | } | ||
| 221 | |||
| 222 | sub check_sphinx() | ||
| 223 | { | ||
| 224 | my $min_version; | ||
| 225 | my $rec_version; | ||
| 226 | my $cur_version; | ||
| 227 | |||
| 228 | open IN, $conf or die "Can't open $conf"; | ||
| 229 | while (<IN>) { | ||
| 230 | if (m/^\s*needs_sphinx\s*=\s*[\'\"]([\d\.]+)[\'\"]/) { | ||
| 231 | $min_version=$1; | ||
| 232 | last; | ||
| 233 | } | ||
| 234 | } | ||
| 235 | close IN; | ||
| 236 | |||
| 237 | die "Can't get needs_sphinx version from $conf" if (!$min_version); | ||
| 238 | |||
| 239 | open IN, $requirement_file or die "Can't open $requirement_file"; | ||
| 240 | while (<IN>) { | ||
| 241 | if (m/^\s*Sphinx\s*==\s*([\d\.]+)$/) { | ||
| 242 | $rec_version=$1; | ||
| 243 | last; | ||
| 244 | } | ||
| 245 | } | ||
| 246 | close IN; | ||
| 247 | |||
| 248 | die "Can't get recommended sphinx version from $requirement_file" if (!$min_version); | ||
| 249 | |||
| 250 | $virtenv_dir .= $rec_version; | ||
| 251 | |||
| 252 | my $sphinx = get_sphinx_fname(); | ||
| 253 | return if ($sphinx eq ""); | ||
| 254 | |||
| 255 | open IN, "$sphinx --version 2>&1 |" or die "$sphinx returned an error"; | ||
| 256 | while (<IN>) { | ||
| 257 | if (m/^\s*sphinx-build\s+([\d\.]+)$/) { | ||
| 258 | $cur_version=$1; | ||
| 259 | last; | ||
| 260 | } | ||
| 261 | # Sphinx 1.2.x uses a different format | ||
| 262 | if (m/^\s*Sphinx.*\s+([\d\.]+)$/) { | ||
| 263 | $cur_version=$1; | ||
| 264 | last; | ||
| 265 | } | ||
| 266 | } | ||
| 267 | close IN; | ||
| 268 | |||
| 269 | die "$sphinx didn't return its version" if (!$cur_version); | ||
| 270 | |||
| 271 | printf "Sphinx version %s (minimal: %s, recommended >= %s)\n", | ||
| 272 | $cur_version, $min_version, $rec_version; | ||
| 273 | |||
| 274 | if ($cur_version lt $min_version) { | ||
| 275 | print "Warning: Sphinx version should be >= $min_version\n\n"; | ||
| 276 | $need_sphinx = 1; | ||
| 277 | return; | ||
| 278 | } | ||
| 279 | |||
| 280 | if ($cur_version lt $rec_version) { | ||
| 281 | print "Warning: It is recommended at least Sphinx version $rec_version.\n"; | ||
| 282 | print " To upgrade, use:\n\n"; | ||
| 283 | $rec_sphinx_upgrade = 1; | ||
| 284 | } | ||
| 222 | } | 285 | } |
| 223 | 286 | ||
| 224 | # | 287 | # |
| @@ -540,7 +603,7 @@ sub check_needs() | |||
| 540 | printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n", | 603 | printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n", |
| 541 | which("sphinx-build-3"); | 604 | which("sphinx-build-3"); |
| 542 | } | 605 | } |
| 543 | if ($need_sphinx) { | 606 | if ($need_sphinx || $rec_sphinx_upgrade) { |
| 544 | my $activate = "$virtenv_dir/bin/activate"; | 607 | my $activate = "$virtenv_dir/bin/activate"; |
| 545 | if (-e "$ENV{'PWD'}/$activate") { | 608 | if (-e "$ENV{'PWD'}/$activate") { |
| 546 | printf "\nNeed to activate virtualenv with:\n"; | 609 | printf "\nNeed to activate virtualenv with:\n"; |
| @@ -554,7 +617,8 @@ sub check_needs() | |||
| 554 | printf "\t$virtualenv $virtenv_dir\n"; | 617 | printf "\t$virtualenv $virtenv_dir\n"; |
| 555 | printf "\t. $activate\n"; | 618 | printf "\t. $activate\n"; |
| 556 | printf "\tpip install -r $requirement_file\n"; | 619 | printf "\tpip install -r $requirement_file\n"; |
| 557 | $need++; | 620 | |
| 621 | $need++ if (!$rec_sphinx_upgrade); | ||
| 558 | } | 622 | } |
| 559 | } | 623 | } |
| 560 | printf "\n"; | 624 | printf "\n"; |
diff --git a/scripts/tracing/draw_functrace.py b/scripts/tracing/draw_functrace.py index 9b6dd4f36335..b65735758520 100755 --- a/scripts/tracing/draw_functrace.py +++ b/scripts/tracing/draw_functrace.py | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
| 2 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 2 | 3 | ||
| 3 | """ | 4 | """ |
| 4 | Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> | 5 | Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> |
| 5 | Licensed under the terms of the GNU GPL License version 2 | ||
| 6 | 6 | ||
| 7 | This script parses a trace provided by the function tracer in | 7 | This script parses a trace provided by the function tracer in |
| 8 | kernel/trace/trace_functions.c | 8 | kernel/trace/trace_functions.c |
