sh updates for v6.3

- sh: clk: Fix clk_enable() to return 0 on NULL clk
 - sh: intc: Avoid spurious sizeof-pointer-div warning
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEYv+KdYTgKVaVRgAGdCY7N/W1+RMFAmP8fcIACgkQdCY7N/W1
 +ROxTw//ZSJfrkMpATBUHbMrJ9BSbCW1ILjRB/s5Pgs6coktsohg9VlIMe6I3CM+
 LmP6j+OqwSKNulWJe477puavG2Ac73j/Qkq5oIg3Y5DUhW1LiArKEJLBeC1FsM9n
 IsANi84ZCn3H2PVQiQrmoVAj8tZLYrDJTmA5iL7x3C3Vr7ys8+psl5YDwIRYoj0J
 usJlTqdY3ZlcW1zWmnBhCHee3pBrrg4AMaV0HtaJcvj9fjXQwWLtjvnUFSOJin2W
 KrDb7xiPzy9buRELQO4BDHMgmzjiHeLQfDWcwph0Skbvfoq/lDBXANCM5DgsxfFh
 6t9da14hyJa6NtWhScUwwum/GCxNSIEnXleLpXUrTCfDpATNtNHeSyl5LHbPTi7x
 xsPmexdFSj2Q3Y3a5MGpc/XtJIHIMi0dnFxifV149WS7X4ug9JHFKBNC9O7CZlED
 LTPau0+V24/GAIwMKGbkHxUf2sFjIllREgJl3wgMmJ7LdyqhWpYMkhcbsdWGODMo
 sM2jP2GLC33Y7OvCZtmOziIv/uSpVFWdDTUg+hQfu9C0H9fqp+TISZIZlYmI8Xpa
 fOgZANguHOJSHbUPaCcoAV+S48ocJReMAaJ03sDysjzXzCGP+ts6SkAkuUV5eee9
 aMb00BVmB21LUKfKFnE1ns9fZQ6IxFffLH823SXR63L387OxNSw=
 =2dUB
 -----END PGP SIGNATURE-----

Merge tag 'sh-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux

Pull sh updates from John Paul Adrian Glaubitz:

 - regression fix in connection with the rtl8169 driver on SuperH boards
   that was introduced when the driver was switched to use
   devm_clk_get_optional_enabled() to simplify the code (Geert
   Uytterhoeven)

 - build warning fix to allow the kernel to be built with CONFIG_WERROR
   enabled (Michael Karcher)

* tag 'sh-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
  sh: clk: Fix clk_enable() to return 0 on NULL clk
  sh: intc: Avoid spurious sizeof-pointer-div warning
This commit is contained in:
Linus Torvalds 2023-03-01 09:44:22 -08:00
commit 1d2aea1bcf
2 changed files with 5 additions and 2 deletions

View File

@ -295,7 +295,7 @@ int clk_enable(struct clk *clk)
int ret;
if (!clk)
return -EINVAL;
return 0;
spin_lock_irqsave(&clock_lock, flags);
ret = __clk_enable(clk);

View File

@ -97,7 +97,10 @@ struct intc_hw_desc {
unsigned int nr_subgroups;
};
#define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a)
#define _INTC_SIZEOF_OR_ZERO(a) (_Generic(a, \
typeof(NULL): 0, \
default: sizeof(a)))
#define _INTC_ARRAY(a) a, _INTC_SIZEOF_OR_ZERO(a)/sizeof(*a)
#define INTC_HW_DESC(vectors, groups, mask_regs, \
prio_regs, sense_regs, ack_regs) \