Thread (1333 messages) 1333 messages, 109 authors, 2024-01-05

Re: [PATCH 8/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in _abb5zes3_rtc_set_timer()

From: Julia Lawall <hidden>
Date: 2016-01-03 17:29:29
Also in: linux-rtc, lkml

On Sun, 3 Jan 2016, SF Markus Elfring wrote:
quoted
quoted
 	ret = regmap_update_bits(data->regmap, ABB5ZES3_REG_TIM_CLK,
-				 mask, ABB5ZES3_REG_TIM_CLK_TAC1);
+				 ABB5ZES3_REG_TIM_CLK_TAC0
+				 | ABB5ZES3_REG_TIM_CLK_TAC1,
+				 ABB5ZES3_REG_TIM_CLK_TAC1);
This doesn't seem like an improvement.
Interesting …

quoted
The concept (mask) has disappeared,
I suggest to drop another local variable.
Can the operator "Bitwise OR" be sufficient to indicate the concept "mask"?

quoted
the binary operation is strangely broken,
Do you prefer an other source code formatting within the usual line length range?

quoted
and the function call has one more line of arguments,
How should several long preprocessor symbols be combined together with indentation
so that they will fit into the limit of 80 characters?

quoted
which all look sort of the same and thus are hard to understand.
Is this an usual consequence from an ordinary name pattern?
The original code was better.  No 80 character problem, easy to 
distinguish one argument from another, moderately meaningful variable 
name, etc.

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