Re: [PATCH v5 04/10] clk: tegra: Add new fields and PLL types for Tegra114

2013-02-04 Thread Peter De Schrijver
On Mon, Feb 04, 2013 at 07:35:29AM +0100, Prashant Gaikwad wrote:
> On Saturday 02 February 2013 01:10 AM, Rhyland Klein wrote:
> > On 2/1/2013 5:18 AM, Peter De Schrijver wrote:
> >> Tegra114 introduces new PLL types. This requires new clocktypes as well
> >> as some new fields in the pll structure.
> >>
> >> Signed-off-by: Peter De Schrijver 
> >> ---
> >>drivers/clk/tegra/clk-pll.c |  719 
> >> +++
> >>drivers/clk/tegra/clk.h |   47 +++
> >>2 files changed, 766 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
> >> index 87d2f34..50114b7 100644
> >> --- a/drivers/clk/tegra/clk-pll.c
> >> +++ b/drivers/clk/tegra/clk-pll.c
> >> [snip]
> >> +struct clk *tegra_clk_register_pllxc(const char *name, const char 
> >> *parent_name,
> >> + void __iomem *clk_base, void __iomem *pmc,
> >> + unsigned long flags, unsigned long fixed_rate,
> >> + struct tegra_clk_pll_params *pll_params,
> >> + u32 pll_flags,
> >> + struct tegra_clk_pll_freq_table *freq_table,
> >> + spinlock_t *lock)
> >> +{
> >> +   if (!pll_params->pdiv_tohw)
> >> +   return -EINVAL;
> >> +
> > This will cause the following warning:
> > warning: return makes pointer from integer without a cast
> >
> > Same with occurrences in tegra_clk_register_pllm and
> > tegra_clk_register_pllc.
> >
> > Should this instead be returning NULL?
> 
> return ERR_PTR(-EINVAL)
> 

Indeed. I noticed that only after I sent this patchset. Already fixed in
my own tree.

Cheers,

Peter.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 04/10] clk: tegra: Add new fields and PLL types for Tegra114

2013-02-04 Thread Peter De Schrijver
On Mon, Feb 04, 2013 at 07:35:29AM +0100, Prashant Gaikwad wrote:
 On Saturday 02 February 2013 01:10 AM, Rhyland Klein wrote:
  On 2/1/2013 5:18 AM, Peter De Schrijver wrote:
  Tegra114 introduces new PLL types. This requires new clocktypes as well
  as some new fields in the pll structure.
 
  Signed-off-by: Peter De Schrijver pdeschrij...@nvidia.com
  ---
 drivers/clk/tegra/clk-pll.c |  719 
  +++
 drivers/clk/tegra/clk.h |   47 +++
 2 files changed, 766 insertions(+), 0 deletions(-)
 
  diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
  index 87d2f34..50114b7 100644
  --- a/drivers/clk/tegra/clk-pll.c
  +++ b/drivers/clk/tegra/clk-pll.c
  [snip]
  +struct clk *tegra_clk_register_pllxc(const char *name, const char 
  *parent_name,
  + void __iomem *clk_base, void __iomem *pmc,
  + unsigned long flags, unsigned long fixed_rate,
  + struct tegra_clk_pll_params *pll_params,
  + u32 pll_flags,
  + struct tegra_clk_pll_freq_table *freq_table,
  + spinlock_t *lock)
  +{
  +   if (!pll_params-pdiv_tohw)
  +   return -EINVAL;
  +
  This will cause the following warning:
  warning: return makes pointer from integer without a cast
 
  Same with occurrences in tegra_clk_register_pllm and
  tegra_clk_register_pllc.
 
  Should this instead be returning NULL?
 
 return ERR_PTR(-EINVAL)
 

Indeed. I noticed that only after I sent this patchset. Already fixed in
my own tree.

Cheers,

Peter.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 04/10] clk: tegra: Add new fields and PLL types for Tegra114

2013-02-03 Thread Prashant Gaikwad

On Saturday 02 February 2013 01:10 AM, Rhyland Klein wrote:

On 2/1/2013 5:18 AM, Peter De Schrijver wrote:

Tegra114 introduces new PLL types. This requires new clocktypes as well
as some new fields in the pll structure.

Signed-off-by: Peter De Schrijver 
---
   drivers/clk/tegra/clk-pll.c |  719 
+++
   drivers/clk/tegra/clk.h |   47 +++
   2 files changed, 766 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 87d2f34..50114b7 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
[snip]
+struct clk *tegra_clk_register_pllxc(const char *name, const char *parent_name,
+ void __iomem *clk_base, void __iomem *pmc,
+ unsigned long flags, unsigned long fixed_rate,
+ struct tegra_clk_pll_params *pll_params,
+ u32 pll_flags,
+ struct tegra_clk_pll_freq_table *freq_table,
+ spinlock_t *lock)
+{
+   if (!pll_params->pdiv_tohw)
+   return -EINVAL;
+

This will cause the following warning:
warning: return makes pointer from integer without a cast

Same with occurrences in tegra_clk_register_pllm and
tegra_clk_register_pllc.

Should this instead be returning NULL?


return ERR_PTR(-EINVAL)



-rhyland



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 04/10] clk: tegra: Add new fields and PLL types for Tegra114

2013-02-03 Thread Prashant Gaikwad

On Saturday 02 February 2013 01:10 AM, Rhyland Klein wrote:

On 2/1/2013 5:18 AM, Peter De Schrijver wrote:

Tegra114 introduces new PLL types. This requires new clocktypes as well
as some new fields in the pll structure.

Signed-off-by: Peter De Schrijver pdeschrij...@nvidia.com
---
   drivers/clk/tegra/clk-pll.c |  719 
+++
   drivers/clk/tegra/clk.h |   47 +++
   2 files changed, 766 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 87d2f34..50114b7 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
[snip]
+struct clk *tegra_clk_register_pllxc(const char *name, const char *parent_name,
+ void __iomem *clk_base, void __iomem *pmc,
+ unsigned long flags, unsigned long fixed_rate,
+ struct tegra_clk_pll_params *pll_params,
+ u32 pll_flags,
+ struct tegra_clk_pll_freq_table *freq_table,
+ spinlock_t *lock)
+{
+   if (!pll_params-pdiv_tohw)
+   return -EINVAL;
+

This will cause the following warning:
warning: return makes pointer from integer without a cast

Same with occurrences in tegra_clk_register_pllm and
tegra_clk_register_pllc.

Should this instead be returning NULL?


return ERR_PTR(-EINVAL)



-rhyland



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 04/10] clk: tegra: Add new fields and PLL types for Tegra114

2013-02-01 Thread Rhyland Klein

On 2/1/2013 5:18 AM, Peter De Schrijver wrote:

Tegra114 introduces new PLL types. This requires new clocktypes as well
as some new fields in the pll structure.

Signed-off-by: Peter De Schrijver 
---
  drivers/clk/tegra/clk-pll.c |  719 +++
  drivers/clk/tegra/clk.h |   47 +++
  2 files changed, 766 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 87d2f34..50114b7 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
[snip]
+struct clk *tegra_clk_register_pllxc(const char *name, const char *parent_name,
+ void __iomem *clk_base, void __iomem *pmc,
+ unsigned long flags, unsigned long fixed_rate,
+ struct tegra_clk_pll_params *pll_params,
+ u32 pll_flags,
+ struct tegra_clk_pll_freq_table *freq_table,
+ spinlock_t *lock)
+{
+   if (!pll_params->pdiv_tohw)
+   return -EINVAL;
+

This will cause the following warning:
warning: return makes pointer from integer without a cast

Same with occurrences in tegra_clk_register_pllm and 
tegra_clk_register_pllc.


Should this instead be returning NULL?

-rhyland

--
nvpublic

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 04/10] clk: tegra: Add new fields and PLL types for Tegra114

2013-02-01 Thread Rhyland Klein

On 2/1/2013 5:18 AM, Peter De Schrijver wrote:

Tegra114 introduces new PLL types. This requires new clocktypes as well
as some new fields in the pll structure.

Signed-off-by: Peter De Schrijver pdeschrij...@nvidia.com
---
  drivers/clk/tegra/clk-pll.c |  719 +++
  drivers/clk/tegra/clk.h |   47 +++
  2 files changed, 766 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 87d2f34..50114b7 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
[snip]
+struct clk *tegra_clk_register_pllxc(const char *name, const char *parent_name,
+ void __iomem *clk_base, void __iomem *pmc,
+ unsigned long flags, unsigned long fixed_rate,
+ struct tegra_clk_pll_params *pll_params,
+ u32 pll_flags,
+ struct tegra_clk_pll_freq_table *freq_table,
+ spinlock_t *lock)
+{
+   if (!pll_params-pdiv_tohw)
+   return -EINVAL;
+

This will cause the following warning:
warning: return makes pointer from integer without a cast

Same with occurrences in tegra_clk_register_pllm and 
tegra_clk_register_pllc.


Should this instead be returning NULL?

-rhyland

--
nvpublic

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/