Re: [PATCH] clk: keystone: sci-clk: fix application of sizeof to pointer

From: Stepan Ionichev

Date: Sat May 09 2026 - 14:50:04 EST


In sci_clk_get(), 'clk' is declared as 'struct sci_clk **', so
sizeof(clk) is sizeof(struct sci_clk **) which is the size of a
pointer rather than the size of an array element. provider->clocks
is an array of 'struct sci_clk *', so the canonical size argument
to bsearch() is sizeof(*clk) (i.e. sizeof(struct sci_clk *)).

The two values are equal on every supported architecture, so this
is correctness/idiom, not a runtime fix, but the new form matches
the rest of the bsearch() callers in the tree and silences the
Coccinelle warning the script flagged.

Reviewed-by: Stepan Ionichev <sozdayvek@xxxxxxxxx>

Stepan