From: David Laight <David.Laight@ACULAB.COM>
To: "'Geert Uytterhoeven'" <geert@linux-m68k.org>,
Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ben Dooks <ben.dooks@codethink.co.uk>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH/RFC] usb: gadget: CONFIG_USB_S3C_HSOTG should depend on HAS_DMA
Date: Tue, 6 May 2014 13:17:21 +0000 [thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D0F70D180@AcuExch.aculab.com> (raw)
In-Reply-To: <1399380554-3746-1-git-send-email-geert@linux-m68k.org>
From: Geert Uytterhoeven
> If NO_DMA=y:
>
> drivers/built-in.o: In function `s3c_hsotg_map_dma':
> s3c-hsotg.c:(.text+0x375b2c): undefined reference to `usb_gadget_map_request'
> drivers/built-in.o: In function `s3c_hsotg_unmap_dma':
> s3c-hsotg.c:(.text+0x376a32): undefined reference to `usb_gadget_unmap_request'
> make[3]: *** [vmlinux] Error 1
>
> Note that all callers of s3c_hsotg_map_dma()/s3c_hsotg_unmap_dma() are
> protected by a call into the using_dma() checking function:
>
> static inline bool using_dma(struct s3c_hsotg *hsotg)
> {
> return false; /* support is not complete */
> }
>
> but not all versions of gcc manage to optimize the check away, causing a
> link error.
A have seen gcc optimise away a call, but leave the undefined symbol
in the symbol table.
That might be what is happening here.
I don't know a generic solution, I used 'objcopy -N__udivdi3' to remove
the explicit unwanted reference from my driver.
David
next prev parent reply other threads:[~2014-05-06 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 12:49 Geert Uytterhoeven
2014-05-06 13:17 ` David Laight [this message]
2014-05-06 15:02 ` Geert Uytterhoeven
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=063D6719AE5E284EB5DD2968C1650D6D0F70D180@AcuExch.aculab.com \
--to=david.laight@aculab.com \
--cc=balbi@ti.com \
--cc=ben.dooks@codethink.co.uk \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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
all inboxes | Powered by JetHome®