linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch: arm: mach-davinci: cdce949.c:  Remove unused function
@ 2014-12-06 23:02 Rickard Strandqvist
  2015-01-14 10:22 ` Sekhar Nori
  0 siblings, 1 reply; 4+ messages in thread
From: Rickard Strandqvist @ 2014-12-06 23:02 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the function cdce_set_rate() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 arch/arm/mach-davinci/cdce949.c              |   37 --------------------------
 arch/arm/mach-davinci/include/mach/cdce949.h |    2 --
 2 files changed, 39 deletions(-)

diff --git a/arch/arm/mach-davinci/cdce949.c b/arch/arm/mach-davinci/cdce949.c
index abafb92..bccac4a 100644
--- a/arch/arm/mach-davinci/cdce949.c
+++ b/arch/arm/mach-davinci/cdce949.c
@@ -212,43 +212,6 @@ static struct cdce_output output_list[] = {
 	[5]	= { cdce_y5_freqs, ARRAY_SIZE(cdce_y5_freqs) },
 };
 
-int cdce_set_rate(struct clk *clk, unsigned long rate)
-{
-	int i, ret = 0;
-	struct cdce_freq *freq_table = output_list[clk->lpsc].freq_table;
-	struct cdce_reg  *regs = NULL;
-
-	if (!cdce_i2c_client)
-		return -ENODEV;
-
-	if (!freq_table)
-		return -EINVAL;
-
-	for (i = 0; i < output_list[clk->lpsc].size; i++) {
-		if (freq_table[i].frequency == rate / 1000) {
-			regs = freq_table[i].reglist;
-			break;
-		}
-	}
-
-	if (!regs)
-		return -EINVAL;
-
-	mutex_lock(&cdce_mutex);
-	for (i = 0; regs[i].addr; i++) {
-		ret = i2c_smbus_write_byte_data(cdce_i2c_client,
-					regs[i].addr | 0x80, regs[i].val);
-		if (ret)
-			break;
-	}
-	mutex_unlock(&cdce_mutex);
-
-	if (!ret)
-		clk->rate = rate;
-
-	return ret;
-}
-
 static int cdce_probe(struct i2c_client *client,
 					const struct i2c_device_id *id)
 {
diff --git a/arch/arm/mach-davinci/include/mach/cdce949.h b/arch/arm/mach-davinci/include/mach/cdce949.h
index c73331f..2280e0b 100644
--- a/arch/arm/mach-davinci/include/mach/cdce949.h
+++ b/arch/arm/mach-davinci/include/mach/cdce949.h
@@ -14,6 +14,4 @@
 
 #include <mach/clock.h>
 
-int cdce_set_rate(struct clk *clk, unsigned long rate);
-
 #endif
-- 
1.7.10.4

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

* [PATCH] arch: arm: mach-davinci: cdce949.c: Remove unused function
  2014-12-06 23:02 [PATCH] arch: arm: mach-davinci: cdce949.c: Remove unused function Rickard Strandqvist
@ 2015-01-14 10:22 ` Sekhar Nori
  2015-01-14 22:56   ` Rickard Strandqvist
  0 siblings, 1 reply; 4+ messages in thread
From: Sekhar Nori @ 2015-01-14 10:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Rickard,

On Sunday 07 December 2014 04:32 AM, Rickard Strandqvist wrote:
> Remove the function cdce_set_rate() that is not used anywhere.
> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  arch/arm/mach-davinci/cdce949.c              |   37 --------------------------
>  arch/arm/mach-davinci/include/mach/cdce949.h |    2 --
>  2 files changed, 39 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/cdce949.c b/arch/arm/mach-davinci/cdce949.c
> index abafb92..bccac4a 100644
> --- a/arch/arm/mach-davinci/cdce949.c
> +++ b/arch/arm/mach-davinci/cdce949.c
> @@ -212,43 +212,6 @@ static struct cdce_output output_list[] = {
>  	[5]	= { cdce_y5_freqs, ARRAY_SIZE(cdce_y5_freqs) },
>  };
>  
> -int cdce_set_rate(struct clk *clk, unsigned long rate)

Without this function, this driver is of no use. I can see that CDCE949
support has remained unused for long time. I would rather see the entire
support including cdce949.c and cdce949.h and their references removed.

Thanks,
Sekhar

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

* [PATCH] arch: arm: mach-davinci: cdce949.c: Remove unused function
  2015-01-14 10:22 ` Sekhar Nori
@ 2015-01-14 22:56   ` Rickard Strandqvist
  2015-01-16 15:47     ` Sekhar Nori
  0 siblings, 1 reply; 4+ messages in thread
From: Rickard Strandqvist @ 2015-01-14 22:56 UTC (permalink / raw)
  To: linux-arm-kernel

2015-01-14 11:22 GMT+01:00 Sekhar Nori <nsekhar@ti.com>:
> Hi Rickard,
>
> On Sunday 07 December 2014 04:32 AM, Rickard Strandqvist wrote:
>> Remove the function cdce_set_rate() that is not used anywhere.
>>
>> This was partially found by using a static code analysis program called cppcheck.
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>> ---
>>  arch/arm/mach-davinci/cdce949.c              |   37 --------------------------
>>  arch/arm/mach-davinci/include/mach/cdce949.h |    2 --
>>  2 files changed, 39 deletions(-)
>>
>> diff --git a/arch/arm/mach-davinci/cdce949.c b/arch/arm/mach-davinci/cdce949.c
>> index abafb92..bccac4a 100644
>> --- a/arch/arm/mach-davinci/cdce949.c
>> +++ b/arch/arm/mach-davinci/cdce949.c
>> @@ -212,43 +212,6 @@ static struct cdce_output output_list[] = {
>>       [5]     = { cdce_y5_freqs, ARRAY_SIZE(cdce_y5_freqs) },
>>  };
>>
>> -int cdce_set_rate(struct clk *clk, unsigned long rate)
>
> Without this function, this driver is of no use. I can see that CDCE949
> support has remained unused for long time. I would rather see the entire
> support including cdce949.c and cdce949.h and their references removed.
>
> Thanks,
> Sekhar
>

Hi

Sure, sounds nice :)
I see if I have time to fix it this weekend.

Kind regards
Rickard Strandqvist

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

* [PATCH] arch: arm: mach-davinci: cdce949.c: Remove unused function
  2015-01-14 22:56   ` Rickard Strandqvist
@ 2015-01-16 15:47     ` Sekhar Nori
  0 siblings, 0 replies; 4+ messages in thread
From: Sekhar Nori @ 2015-01-16 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 15 January 2015 04:26 AM, Rickard Strandqvist wrote:
> 2015-01-14 11:22 GMT+01:00 Sekhar Nori <nsekhar@ti.com>:
>> Hi Rickard,
>>
>> On Sunday 07 December 2014 04:32 AM, Rickard Strandqvist wrote:
>>> Remove the function cdce_set_rate() that is not used anywhere.
>>>
>>> This was partially found by using a static code analysis program called cppcheck.
>>>
>>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>>> ---
>>>  arch/arm/mach-davinci/cdce949.c              |   37 --------------------------
>>>  arch/arm/mach-davinci/include/mach/cdce949.h |    2 --
>>>  2 files changed, 39 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-davinci/cdce949.c b/arch/arm/mach-davinci/cdce949.c
>>> index abafb92..bccac4a 100644
>>> --- a/arch/arm/mach-davinci/cdce949.c
>>> +++ b/arch/arm/mach-davinci/cdce949.c
>>> @@ -212,43 +212,6 @@ static struct cdce_output output_list[] = {
>>>       [5]     = { cdce_y5_freqs, ARRAY_SIZE(cdce_y5_freqs) },
>>>  };
>>>
>>> -int cdce_set_rate(struct clk *clk, unsigned long rate)
>>
>> Without this function, this driver is of no use. I can see that CDCE949
>> support has remained unused for long time. I would rather see the entire
>> support including cdce949.c and cdce949.h and their references removed.
>>
>> Thanks,
>> Sekhar
>>
> 
> Hi
> 
> Sure, sounds nice :)
> I see if I have time to fix it this weekend.

Okay, I will wait till Monday before preparing my pull requests.

Thanks,
Sekhar

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

end of thread, other threads:[~2015-01-16 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-06 23:02 [PATCH] arch: arm: mach-davinci: cdce949.c: Remove unused function Rickard Strandqvist
2015-01-14 10:22 ` Sekhar Nori
2015-01-14 22:56   ` Rickard Strandqvist
2015-01-16 15:47     ` Sekhar Nori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).