linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nm@ti.com (Nishanth Menon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared
Date: Tue, 04 Jan 2011 12:56:50 -0600	[thread overview]
Message-ID: <4D236D72.7080406@ti.com> (raw)
In-Reply-To: <bd04d3678881a910a0639746ed04043d@mail.gmail.com>

Santosh Shilimkar had written, on 01/04/2011 12:51 PM, the following:
>> -----Original Message-----
>> From: Nishanth Menon [mailto:nm at ti.com]
>> Sent: Wednesday, January 05, 2011 12:19 AM
>> To: Santosh Shilimkar
>> Cc: linux-omap at vger.kernel.org; khilman at ti.com; tony at atomide.com;
>> linux-arm-kernel at lists.infradead.org; Thara Gopinath; Kevin Hilman
>> Subject: Re: [PATCH 5/5] omap2plus: voltage: Trivial linking fix for
>> 'EINVAL' undeclared
>>
>> Santosh Shilimkar had written, on 01/04/2011 12:26 PM, the
>> following:
>>> CC      arch/arm/mach-omap2/omap_hwmod_common_data.o
>>> In file included from arch/arm/plat-
>> omap/include/plat/omap_hwmod.h:38,
>>>                  from arch/arm/mach-
>> omap2/omap_hwmod_common_data.c:20:
>>> arch/arm/plat-omap/include/plat/voltage.h: In function
>> 'omap_voltage_late_init':
>>> arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL'
>> undeclared (first use in this function)
>>> arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each
>> undeclared identifier is reported only once
>>> arch/arm/plat-omap/include/plat/voltage.h:145: error: for each
>> function it appears in.)
>>> make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error
>> 1
>>> make: *** [arch/arm/mach-omap2] Error 2
>>>
>>> The error is reported when omap2plus_defconfig built with
>> CONFIG_PM disabled
>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> Cc: Thara Gopinath <thara@ti.com>
>>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>>> ---
>>>  arch/arm/plat-omap/include/plat/voltage.h |    2 ++
>>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/plat-omap/include/plat/voltage.h
>> b/arch/arm/plat-omap/include/plat/voltage.h
>>> index c095351..2b776f0 100644
>>> --- a/arch/arm/plat-omap/include/plat/voltage.h
>>> +++ b/arch/arm/plat-omap/include/plat/voltage.h
>>> @@ -14,6 +14,8 @@
>>>  #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
>>>  #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H
>>>
>>> +#include <linux/err.h>
>>> +
>> Not sure if this is better OR including the err.h in c files is
>> better,
>> since the c file is the location where the error code is actually
>> used..
>>
>> but no strong feelings about either personally.
>>
> The error is because of 'EINVAL' usage in header file. How
> Will this error get fixed by including err.h is C file ?
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c
@@ -16,6 +16,7 @@
   * data and their integration with other OMAP modules and Linux.
   */

+#include <linux/err.h>
  #include <plat/omap_hwmod.h>

  #include "omap_hwmod_common_data.h"

no?

Basically, this points that omap_hwmod_common_data.c does not use the 
error return values, which probably gets hidden by including err.h in 
the header itself.. in this particular case, maynot be important, and 
probably apis which should have return values checked should be marked 
so.. anyways, just my 2 cents - no hard opinions about either as far as 
I am concerned.

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2011-01-04 18:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 18:26 [PATCH 0/5] omap2plus: Trivial build break fixes Santosh Shilimkar
2011-01-04 18:26 ` [PATCH 1/5] omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask Santosh Shilimkar
2011-01-04 18:26   ` [PATCH 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg' Santosh Shilimkar
2011-01-04 18:26     ` [PATCH 3/5] omap2plus: voltage: Trivial warning fix 'no return statement' Santosh Shilimkar
2011-01-04 18:26       ` [PATCH 4/5] omap2plus: voltage: Trivial linking fix 'undefined reference' Santosh Shilimkar
2011-01-04 18:26         ` [PATCH 5/5] omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared Santosh Shilimkar
2011-01-04 18:49           ` Nishanth Menon
2011-01-04 18:51             ` Santosh Shilimkar
2011-01-04 18:56               ` Nishanth Menon [this message]
2011-01-04 18:46         ` [PATCH 4/5] omap2plus: voltage: Trivial linking fix 'undefined reference' Nishanth Menon
2011-01-04 18:48           ` Santosh Shilimkar
2011-01-04 18:50             ` Santosh Shilimkar
2011-01-04 18:52               ` Nishanth Menon
2011-01-04 18:43       ` [PATCH 3/5] omap2plus: voltage: Trivial warning fix 'no return statement' Nishanth Menon
2011-01-04 18:46         ` Santosh Shilimkar
2011-01-04 18:41     ` [PATCH 2/5] omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg' Paul Walmsley
2011-01-04 18:43       ` Santosh Shilimkar
2011-01-05  0:32         ` Kevin Hilman
2011-01-05  8:18           ` Santosh Shilimkar
2011-01-04 18:43   ` [PATCH 1/5] omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask Paul Walmsley
2011-01-04 18:45     ` Santosh Shilimkar
2011-01-05  0:37 ` [PATCH 0/5] omap2plus: Trivial build break fixes Kevin Hilman
2011-01-05 10:58   ` Santosh Shilimkar
2011-01-05 17:20     ` Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D236D72.7080406@ti.com \
    --to=nm@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).