Thread (19 messages) 19 messages, 5 authors, 2024-11-08

Re: [PATCH v2 04/11] clk: qcom: camcc-qcs615: Add QCS615 camera clock controller driver

From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Date: 2024-11-01 12:29:28
Also in: linux-arm-msm, linux-clk, linux-devicetree, lkml

On 01/11/2024 10:38, Taniya Das wrote:
+	.vco_val = 0x2 << 20,
vco_val = BIT(21)
+	.vco_mask = 0x3 << 20,
Instead of bit shifting couldn't we just use GENMASK ?

Aside from anything else shifting a hex value by a decimal value isn't 
the clearest code in the world.

vco_mask = GENMASK(21, 20)

Much cleaner.

drivers/clk/qcom/gcc-sm6115.c

Same comment for all of the bit-shifts in the series, I appreciate the 
shifts are what the downstream code does but BIT/GENMASK does this job 
better.

Once fixed you can add my

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

to this file

---
bod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help