Skip to contentSkip to conversation

Drivers: clk: clk-mux: fixed line exceeding char limit and irrelevant messages

PATCH In review Shivani Bhardwaj 2 participants 2 messages Sep 29, 2015 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Drivers: clk: clk-mux: fixed line exceeding char limit and irrelevant messages

Fixed warnings about line exceeding 80 characters and unnecessary error print statements.

---
 drivers/clk/clk-mux.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/clk/clk-mux.c +8 -7
index 7129c86..2ef8eda 100644
@@ -35,12 +35,13 @@ static u8 clk_mux_get_parent(struct clk_hw *hw)
 	u32 val;
 
 	/*
-	 * FIXME need a mux-specific flag to determine if val is bitwise or numeric
-	 * e.g. sys_clkin_ck's clksel field is 3 bits wide, but ranges from 0x1
-	 * to 0x7 (index starts at one)
-	 * OTOH, pmd_trace_clk_mux_ck uses a separate bit for each clock, so
-	 * val = 0x4 really means "bit 2, index starts at bit 0"
-	 */
+	* FIXME need a mux-specific flag to determine if val is
+	* bitwise or numeric
+	* e.g. sys_clkin_ck's clksel field is 3 bits wide, but ranges from 0x1
+	* to 0x7 (index starts at one)
+	* OTOH, pmd_trace_clk_mux_ck uses a separate bit for each clock, so
+	* val = 0x4 really means "bit 2, index starts at bit 0"
+	*/
 	val = clk_readl(mux->reg) >> mux->shift;
 	val &= mux->mask;
 
@@ -138,7 +139,7 @@ struct clk *clk_register_mux_table(struct device *dev, const char *name,
 	/* allocate the mux */
 	mux = kzalloc(sizeof(struct clk_mux), GFP_KERNEL);
 	if (!mux) {
-		pr_err("%s: could not allocate mux clk\n", __func__);
+		/*pr_err("%s: could not allocate mux clk\n", __func__);*/
 		return ERR_PTR(-ENOMEM);
 	}
 
Signature · 1 line
2.1.0
#1 lore raw

drivers/clk/clk-mux.c

Quoted 9 lines · Shivani Bhardwaj

Fixed warnings about line exceeding 80 characters and unnecessary error print statements.

---
 drivers/clk/clk-mux.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/clk/clk-mux.c +0 -0

Again, this is not the code that you should be working on.

Quoted 24 lines

index 7129c86..2ef8eda 100644

drivers/clk/clk-mux.c +7 -6
@@ -35,12 +35,13 @@ static u8 clk_mux_get_parent(struct clk_hw *hw)
 	u32 val;
 
 	/*
-	 * FIXME need a mux-specific flag to determine if val is bitwise or numeric
-	 * e.g. sys_clkin_ck's clksel field is 3 bits wide, but ranges from 0x1
-	 * to 0x7 (index starts at one)
-	 * OTOH, pmd_trace_clk_mux_ck uses a separate bit for each clock, so
-	 * val = 0x4 really means "bit 2, index starts at bit 0"
-	 */
+	* FIXME need a mux-specific flag to determine if val is
+	* bitwise or numeric
+	* e.g. sys_clkin_ck's clksel field is 3 bits wide, but ranges from 0x1
+	* to 0x7 (index starts at one)
+	* OTOH, pmd_trace_clk_mux_ck uses a separate bit for each clock, so
+	* val = 0x4 really means "bit 2, index starts at bit 0"
+	*/
 	val = clk_readl(mux->reg) >> mux->shift;
 	val &= mux->mask;
 

drivers/clk/clk-mux.c struct clk *clk_register_mux_table(struct device *dev, const char *name, · line 142

Quoted 5 lines
drivers/clk/clk-mux.c +1 -1
@@ -138,7 +139,7 @@ struct clk *clk_register_mux_table(struct device *dev, const char *name,
 	/* allocate the mux */
 	mux = kzalloc(sizeof(struct clk_mux), GFP_KERNEL);
 	if (!mux) {
-		pr_err("%s: could not allocate mux clk\n", __func__);
+		/*pr_err("%s: could not allocate mux clk\n", __func__);*/

If the print is not needed, you should just drop it. The comment makes clutter, and thus makes the code harder to read. In general, code that is not needed should not be put under comments. It should just be removed.

julia

Quoted 13 lines
drivers/clk/clk-mux.c +0 -0
 		return ERR_PTR(-ENOMEM);
 	}
 
Signature · 8 lines
2.1.0

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150929205325.GA10085%40ubuntu.
For more options, visit https://groups.google.com/d/optout.