Skip to content

Commit 1d2aea1

Browse files
committed
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
2 parents a8356cd + ff30bd6 commit 1d2aea1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/sh/clk/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ int clk_enable(struct clk *clk)
295295
int ret;
296296

297297
if (!clk)
298-
return -EINVAL;
298+
return 0;
299299

300300
spin_lock_irqsave(&clock_lock, flags);
301301
ret = __clk_enable(clk);

include/linux/sh_intc.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ struct intc_hw_desc {
9797
unsigned int nr_subgroups;
9898
};
9999

100-
#define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a)
100+
#define _INTC_SIZEOF_OR_ZERO(a) (_Generic(a, \
101+
typeof(NULL): 0, \
102+
default: sizeof(a)))
103+
#define _INTC_ARRAY(a) a, _INTC_SIZEOF_OR_ZERO(a)/sizeof(*a)
101104

102105
#define INTC_HW_DESC(vectors, groups, mask_regs, \
103106
prio_regs, sense_regs, ack_regs) \

0 commit comments

Comments
 (0)