From: Stephane Grosjean <s.grosjean@peak-system.com>
To: linux-sh@vger.kernel.org
Subject: Re: drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unm
Date: Tue, 02 Apr 2013 14:04:00 +0000 [thread overview]
Message-ID: <515AE550.2030605@peak-system.com> (raw)
In-Reply-To: <20130327083110.GB11489@localhost>
Le 27/03/2013 11:22, Marc Kleine-Budde a écrit :
> On 03/27/2013 10:41 AM, Paul Mundt wrote:
>> On Wed, Mar 27, 2013 at 04:31:10PM +0800, Fengguang Wu wrote:
>>> Hi Stephane,
>>>
>>> FYI, kernel build failed on
>>>
>>> tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux master
>>> head: de55eb1d60d2ed0f1ba5e13226d91b3bfbe1c108
>>> commit: 2b61972b74219d21ef1e91178349bdb840357688 can: sja1000: add support for PEAK-System PCMCIA card
>>> date: 1 year, 1 month ago
>>> config: make ARCH=sh allyesconfig
>>>
>>> All error/warnings:
>>>
>>> In file included from drivers/net/can/sja1000/peak_pcmcia.c:28:0:
>>> drivers/net/can/sja1000/sja1000.h:59:0: warning: "REG_SR" redefined [enabled by default]
>>> arch/sh/include/asm/ptrace_32.h:25:0: note: this is the location of the previous definition
>>> drivers/net/can/sja1000/peak_pcmcia.c: In function 'pcan_free':
>>>>> drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unmap' [-Werror=implicit-function-declaration]
>>> drivers/net/can/sja1000/peak_pcmcia.c: In function 'pcan_probe':
>>>>> drivers/net/can/sja1000/peak_pcmcia.c:672:2: error: implicit declaration of function 'ioport_map' [-Werror=implicit-function-declaration]
>>> drivers/net/can/sja1000/peak_pcmcia.c:672:20: warning: assignment makes pointer from integer without a cast [enabled by default]
>>> cc1: some warnings being treated as errors
>>>
>> This would no doubt be due to the defconfig selecting NO_IOPORT. This
>> driver probably needs a HAS_IOPORT depends.
> Stephane, can we use pcmcia_map_mem_page() instead of ioport_map() like
> in the ems_pcmcia driver?
>
> http://lxr.free-electrons.com/source/drivers/net/can/sja1000/ems_pcmcia.c#L286
I'm afraid we won't! Unfortunately, the PCAN-PCCARD doesn't use the
common memory area at all. I did use the ioport_map() function because
of the iomem * type of the reg_base member of the sja1000_priv struct.
Moreover, the access to the SJA1000 registers is available only if i/o
signals are set. So, I see two solutions:
1. rewriting peak_pcmcia.c much more like
"drivers/net/can/sja1000/tscan1.c" (and casting from "iomem *" to
"unsigned long")
2. or counting on HAS_IOPORT flags (but how does manage
drivers/net/wireless/libertas/if_cs.c driver to compile without any
error nor warning?)
What is your opinion, please?
Regards,
Stéphane
> Marc
>
--
PEAK-System Technik GmbH, Otto-Roehm-Strasse 69, D-64293 Darmstadt
Geschaeftsleitung: A.Gach/U.Wilhelm,St.Nr.:007/241/13586 FA Darmstadt
HRB-9183 Darmstadt, Ust.IdNr.:DE 202220078, WEE-Reg.-Nr.: DE39305391
Tel.+49 (0)6151-817320 / Fax:+49 (0)6151-817329, info@peak-system.com
prev parent reply other threads:[~2013-04-02 14:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 8:31 drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unmap' Fengguang Wu
2013-03-27 9:41 ` drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unm Paul Mundt
2013-03-27 10:22 ` Marc Kleine-Budde
2013-04-02 7:47 ` Stephane Grosjean
2013-04-02 14:04 ` Stephane Grosjean [this message]
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=515AE550.2030605@peak-system.com \
--to=s.grosjean@peak-system.com \
--cc=linux-sh@vger.kernel.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).