All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Drivers: clk: clk-mux: fixed line exceeding char limit and irrelevant messages
@ 2015-09-29 20:53 Shivani Bhardwaj
  2015-09-29 21:23 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Shivani Bhardwaj @ 2015-09-29 20:53 UTC (permalink / raw)
  To: outreachy-kernel

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

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
 drivers/clk/clk-mux.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index 7129c86..2ef8eda 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -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);
 	}
 
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Outreachy kernel] [PATCH] Drivers: clk: clk-mux: fixed line exceeding char limit and irrelevant messages
  2015-09-29 20:53 [PATCH] Drivers: clk: clk-mux: fixed line exceeding char limit and irrelevant messages Shivani Bhardwaj
@ 2015-09-29 21:23 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2015-09-29 21:23 UTC (permalink / raw)
  To: Shivani Bhardwaj; +Cc: outreachy-kernel

On Wed, 30 Sep 2015, Shivani Bhardwaj wrote:

> Fixed warnings about line exceeding 80 characters and unnecessary error print
> statements.
> 
> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
> ---
>  drivers/clk/clk-mux.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c

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

> index 7129c86..2ef8eda 100644
> --- a/drivers/clk/clk-mux.c
> +++ b/drivers/clk/clk-mux.c
> @@ -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__);*/

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

>  		return ERR_PTR(-ENOMEM);
>  	}
>  
> -- 
> 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> 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.
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-29 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 20:53 [PATCH] Drivers: clk: clk-mux: fixed line exceeding char limit and irrelevant messages Shivani Bhardwaj
2015-09-29 21:23 ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.