Find a file
Jakub Kicinski 2b7ac0c87d tools: ynl-gen: don't touch the output file if content is the same
I often regenerate all YNL files in the tree to make sure they
are in sync with the codegen and specs. Generator rewrites
the files unconditionally, so since make looks at file modification
time to decide what to rebuild - my next build takes longer.

We already generate the code to a tempfile most of the time,
only overwrite the target when we have to.

Before:

  $ stat include/uapi/linux/netdev.h
    File: include/uapi/linux/netdev.h
    Size: 2307      	Blocks: 8          IO Block: 4096   regular file
  Access: 2023-10-27 15:19:56.347071940 -0700
  Modify: 2023-10-27 15:19:45.089000900 -0700
  Change: 2023-10-27 15:19:45.089000900 -0700
   Birth: 2023-10-27 15:19:45.088000894 -0700

  $ ./tools/net/ynl/ynl-regen.sh -f
  [...]

  $ stat include/uapi/linux/netdev.h
    File: include/uapi/linux/netdev.h
    Size: 2307      	Blocks: 8          IO Block: 4096   regular file
  Access: 2023-10-27 15:19:56.347071940 -0700
  Modify: 2023-10-27 15:22:18.417968446 -0700
  Change: 2023-10-27 15:22:18.417968446 -0700
   Birth: 2023-10-27 15:19:45.088000894 -0700

After:

  $ stat include/uapi/linux/netdev.h
    File: include/uapi/linux/netdev.h
    Size: 2307      	Blocks: 8          IO Block: 4096   regular file
  Access: 2023-10-27 15:22:41.520114221 -0700
  Modify: 2023-10-27 15:22:18.417968446 -0700
  Change: 2023-10-27 15:22:18.417968446 -0700
   Birth: 2023-10-27 15:19:45.088000894 -0700

  $ ./tools/net/ynl/ynl-regen.sh -f
  [...]

  $ stat include/uapi/linux/netdev.h
    File: include/uapi/linux/netdev.h
    Size: 2307      	Blocks: 8          IO Block: 4096   regular file
  Access: 2023-10-27 15:22:41.520114221 -0700
  Modify: 2023-10-27 15:22:18.417968446 -0700
  Change: 2023-10-27 15:22:18.417968446 -0700
   Birth: 2023-10-27 15:19:45.088000894 -0700

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20231027223408.1865704-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-11-01 22:14:00 -07:00
arch asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
block for-6.7/block-2023-10-30 2023-11-01 12:30:07 -10:00
certs certs: Reference revocation list for all keyrings 2023-08-17 20:12:41 +00:00
crypto KEYS: asymmetric: Fix sign/verify on pkcs1pad without a hash 2023-10-18 12:27:10 +08:00
Documentation netlink: specs: devlink: add forgotten port function caps enum values 2023-11-01 22:13:43 -07:00
drivers net: mdio: fill in missing MODULE_DESCRIPTION()s 2023-11-01 21:50:57 -07:00
fs Bootconfig for v6.7: 2023-11-01 16:07:05 -10:00
include Follow up to networking PR for 6.7 2023-11-01 16:33:20 -10:00
init asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
io_uring io_uring-futex-2023-10-30 2023-11-01 11:25:08 -10:00
ipc ipc: convert to new timestamp accessors 2023-10-18 14:08:30 +02:00
kernel Probes updates for v6.7: 2023-11-01 16:15:42 -10:00
lib Probes updates for v6.7: 2023-11-01 16:15:42 -10:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
net netlink: specs: devlink: add forgotten port function caps enum values 2023-11-01 22:13:43 -07:00
rust workqueue: Add rust bindings for v6.7 2023-10-30 20:35:48 -10:00
samples Probes updates for v6.7: 2023-11-01 16:15:42 -10:00
scripts asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
security for-6.7/block-2023-10-30 2023-11-01 12:30:07 -10:00
sound vfs-6.7.iov_iter 2023-10-30 09:24:21 -10:00
tools tools: ynl-gen: don't touch the output file if content is the same 2023-11-01 22:14:00 -07:00
usr arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
virt ARM: 2023-09-07 13:52:20 -07:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: rpm-pkg: rename binkernel.spec to kernel.spec 2023-07-25 00:59:33 +09:00
.mailmap 20 hotfixes. 12 are cc:stable and the remainder address post-6.5 issues 2023-10-24 09:52:16 -10:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING
CREDITS USB: Remove Wireless USB and UWB documentation 2023-08-09 14:17:32 +02:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig
MAINTAINERS Probes updates for v6.7: 2023-11-01 16:15:42 -10:00
Makefile asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.