1. 08 Sep, 2024 1 commit
    • Christophe JAILLET's avatar
      hwmon: (pmbus/mpq7932) Constify struct regulator_desc · d22bd451
      Christophe JAILLET authored
      'struct regulator_desc' is not modified in this driver.
      
      Constifying this structure moves some data to a read-only section, so
      increase overall security, especially when the structure holds some
      function pointers.
      
      This also makes mpq7932_regulators_desc consistent with
      mpq7932_regulators_desc_one which is already a "static const struct
      regulator_desc".
      
      On a x86_64, with allmodconfig:
      Before:
      ======
         text	   data	    bss	    dec	    hex	filename
         3516	   2264	      0	   5780	   1694	drivers/hwmon/pmbus/mpq7932.o
      
      After:
      =====
         text	   data	    bss	    dec	    hex	filename
         5396	    384	      0	   5780	   1694	drivers/hwmon/pmbus/mpq7932.o
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Message-ID: <c0585a07547ec58d99a5bff5e02b398114bbe312.1725784343.git.christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      d22bd451
  2. 02 Sep, 2024 5 commits
  3. 30 Aug, 2024 14 commits
  4. 29 Aug, 2024 1 commit
  5. 28 Aug, 2024 1 commit
    • Nathan Chancellor's avatar
      hwmon: (oxp-sensors) Add missing breaks to fix -Wimplicit-fallthrough with clang · 98845e77
      Nathan Chancellor authored
      clang warns (or errors due to CONFIG_WERROR):
      
        drivers/hwmon/oxp-sensors.c:481:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        drivers/hwmon/oxp-sensors.c:553:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        drivers/hwmon/oxp-sensors.c:556:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        drivers/hwmon/oxp-sensors.c:607:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
      
      Clang is a little more pedantic than GCC, which does not warn when
      falling through to a case that is just break or return. Clang's version
      is more in line with the kernel's own stance in deprecated.rst, which
      states that all switch/case blocks must end in either break,
      fallthrough, continue, goto, or return. Add the missing breaks to
      silence the warnings.
      
      Fixes: b82b38a4 ("hwmon: (oxp-sensors) Add support for multiple new devices.")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Message-ID: <20240828-hwmon-oxp-sensors-fix-clang-implicit-fallthrough-v1-1-dc48496ac67a@kernel.org>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      98845e77
  6. 27 Aug, 2024 18 commits