* drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unmap'
@ 2013-03-27 8:31 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
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Fengguang Wu @ 2013-03-27 8:31 UTC (permalink / raw)
To: linux-sh
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
vim +/ioport_unmap +626 drivers/net/can/sja1000/peak_pcmcia.c
2b61972b Stephane Grosjean 2012-03-02 620
2b61972b Stephane Grosjean 2012-03-02 621 free_irq(pdev->irq, card);
2b61972b Stephane Grosjean 2012-03-02 622 pcan_stop_led_timer(card);
2b61972b Stephane Grosjean 2012-03-02 623
2b61972b Stephane Grosjean 2012-03-02 624 pcan_free_channels(card);
2b61972b Stephane Grosjean 2012-03-02 625
2b61972b Stephane Grosjean 2012-03-02 @626 ioport_unmap(card->ioport_addr);
2b61972b Stephane Grosjean 2012-03-02 627
2b61972b Stephane Grosjean 2012-03-02 628 kfree(card);
2b61972b Stephane Grosjean 2012-03-02 629 pdev->priv = NULL;
2b61972b Stephane Grosjean 2012-03-02 630 }
2b61972b Stephane Grosjean 2012-03-02 631
2b61972b Stephane Grosjean 2012-03-02 632 /*
2b61972b Stephane Grosjean 2012-03-02 633 * setup PCMCIA socket and probe for PEAK-System PC-CARD
2b61972b Stephane Grosjean 2012-03-02 634 */
2b61972b Stephane Grosjean 2012-03-02 635 static int __devinit pcan_probe(struct pcmcia_device *pdev)
2b61972b Stephane Grosjean 2012-03-02 636 {
2b61972b Stephane Grosjean 2012-03-02 637 struct pcan_pccard *card;
2b61972b Stephane Grosjean 2012-03-02 638 int err;
2b61972b Stephane Grosjean 2012-03-02 639
2b61972b Stephane Grosjean 2012-03-02 640 pdev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
2b61972b Stephane Grosjean 2012-03-02 641
2b61972b Stephane Grosjean 2012-03-02 642 err = pcmcia_loop_config(pdev, pcan_conf_check, NULL);
2b61972b Stephane Grosjean 2012-03-02 643 if (err) {
2b61972b Stephane Grosjean 2012-03-02 644 dev_err(&pdev->dev, "pcmcia_loop_config() error %d\n", err);
2b61972b Stephane Grosjean 2012-03-02 645 goto probe_err_1;
2b61972b Stephane Grosjean 2012-03-02 646 }
2b61972b Stephane Grosjean 2012-03-02 647
2b61972b Stephane Grosjean 2012-03-02 648 if (!pdev->irq) {
2b61972b Stephane Grosjean 2012-03-02 649 dev_err(&pdev->dev, "no irq assigned\n");
2b61972b Stephane Grosjean 2012-03-02 650 err = -ENODEV;
2b61972b Stephane Grosjean 2012-03-02 651 goto probe_err_1;
2b61972b Stephane Grosjean 2012-03-02 652 }
2b61972b Stephane Grosjean 2012-03-02 653
2b61972b Stephane Grosjean 2012-03-02 654 err = pcmcia_enable_device(pdev);
2b61972b Stephane Grosjean 2012-03-02 655 if (err) {
2b61972b Stephane Grosjean 2012-03-02 656 dev_err(&pdev->dev, "pcmcia_enable_device failed err=%d\n",
2b61972b Stephane Grosjean 2012-03-02 657 err);
2b61972b Stephane Grosjean 2012-03-02 658 goto probe_err_1;
2b61972b Stephane Grosjean 2012-03-02 659 }
2b61972b Stephane Grosjean 2012-03-02 660
2b61972b Stephane Grosjean 2012-03-02 661 card = kzalloc(sizeof(struct pcan_pccard), GFP_KERNEL);
2b61972b Stephane Grosjean 2012-03-02 662 if (!card) {
2b61972b Stephane Grosjean 2012-03-02 663 dev_err(&pdev->dev, "couldn't allocate card memory\n");
2b61972b Stephane Grosjean 2012-03-02 664 err = -ENOMEM;
2b61972b Stephane Grosjean 2012-03-02 665 goto probe_err_2;
2b61972b Stephane Grosjean 2012-03-02 666 }
2b61972b Stephane Grosjean 2012-03-02 667
2b61972b Stephane Grosjean 2012-03-02 668 card->pdev = pdev;
2b61972b Stephane Grosjean 2012-03-02 669 pdev->priv = card;
2b61972b Stephane Grosjean 2012-03-02 670
2b61972b Stephane Grosjean 2012-03-02 671 /* sja1000 api uses iomem */
2b61972b Stephane Grosjean 2012-03-02 @672 card->ioport_addr = ioport_map(pdev->resource[0]->start,
2b61972b Stephane Grosjean 2012-03-02 673 resource_size(pdev->resource[0]));
2b61972b Stephane Grosjean 2012-03-02 674 if (!card->ioport_addr) {
2b61972b Stephane Grosjean 2012-03-02 675 dev_err(&pdev->dev, "couldn't map io port into io memory\n");
---
0-DAY kernel build testing backend Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unm
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 ` Paul Mundt
2013-03-27 10:22 ` Marc Kleine-Budde
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Paul Mundt @ 2013-03-27 9:41 UTC (permalink / raw)
To: linux-sh
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unm
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
3 siblings, 0 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2013-03-27 10:22 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: text/plain, Size: 1991 bytes --]
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
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unm
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
3 siblings, 0 replies; 5+ messages in thread
From: Stephane Grosjean @ 2013-04-02 7:47 UTC (permalink / raw)
To: linux-sh
Hi Marc,
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
Ok, I'll have a look to that asap.
Meanwhile, adding the HAS_IOPORT depends in
drivers/net/can/sja1000/Kconfig does the trick. What do you think about
that?
BR,
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unm
2013-03-27 8:31 drivers/net/can/sja1000/peak_pcmcia.c:626:2: error: implicit declaration of function 'ioport_unmap' Fengguang Wu
` (2 preceding siblings ...)
2013-04-02 7:47 ` Stephane Grosjean
@ 2013-04-02 14:04 ` Stephane Grosjean
3 siblings, 0 replies; 5+ messages in thread
From: Stephane Grosjean @ 2013-04-02 14:04 UTC (permalink / raw)
To: linux-sh
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-02 14:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).