diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-01-13 11:10:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-13 17:08:21 -0500 |
commit | 3e7a8716e20b759eec0ad88145255bb33174f0c8 (patch) | |
tree | e16e402f232cb104bcc0dd42fe7001dfe8f43f8a /drivers/isdn | |
parent | 7835bfb5261501590a508b3de3379e2231cb4853 (diff) |
mISDN: avoid arch specific __builtin_return_address call
Not all architectures are able to call __builtin_return_address().
On ARM, the mISDN code produces this warning:
hardware/mISDN/w6692.c: In function 'w6692_dctrl':
hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
pr_debug("%s: %s dev(%d) open from %p\n", card->name, __func__,
^
hardware/mISDN/mISDNipac.c: In function 'open_dchannel':
hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
pr_debug("%s: %s dev(%d) open from %p\n", isac->name, __func__,
^
In a lot of cases, this is relatively easy to work around by
passing the value of __builtin_return_address(0) from the
callers into the functions that want it. One exception is
the indirect 'open' function call in struct isac_hw. While it
would be possible to fix this as well, this patch only addresses
the other callers properly and lets this one return the direct
parent function, which should be good enough.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/hardware/mISDN/mISDNipac.c | 12 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/w6692.c | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c index ccd7d851be26..a77eea594b69 100644 --- a/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c | |||
@@ -754,10 +754,10 @@ dbusy_timer_handler(struct isac_hw *isac) | |||
754 | } | 754 | } |
755 | 755 | ||
756 | static int | 756 | static int |
757 | open_dchannel(struct isac_hw *isac, struct channel_req *rq) | 757 | open_dchannel_caller(struct isac_hw *isac, struct channel_req *rq, void *caller) |
758 | { | 758 | { |
759 | pr_debug("%s: %s dev(%d) open from %p\n", isac->name, __func__, | 759 | pr_debug("%s: %s dev(%d) open from %p\n", isac->name, __func__, |
760 | isac->dch.dev.id, __builtin_return_address(1)); | 760 | isac->dch.dev.id, caller); |
761 | if (rq->protocol != ISDN_P_TE_S0) | 761 | if (rq->protocol != ISDN_P_TE_S0) |
762 | return -EINVAL; | 762 | return -EINVAL; |
763 | if (rq->adr.channel == 1) | 763 | if (rq->adr.channel == 1) |
@@ -771,6 +771,12 @@ open_dchannel(struct isac_hw *isac, struct channel_req *rq) | |||
771 | return 0; | 771 | return 0; |
772 | } | 772 | } |
773 | 773 | ||
774 | static int | ||
775 | open_dchannel(struct isac_hw *isac, struct channel_req *rq) | ||
776 | { | ||
777 | return open_dchannel_caller(isac, rq, __builtin_return_address(0)); | ||
778 | } | ||
779 | |||
774 | static const char *ISACVer[] = | 780 | static const char *ISACVer[] = |
775 | {"2086/2186 V1.1", "2085 B1", "2085 B2", | 781 | {"2086/2186 V1.1", "2085 B1", "2085 B2", |
776 | "2085 V2.3"}; | 782 | "2085 V2.3"}; |
@@ -1548,7 +1554,7 @@ ipac_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg) | |||
1548 | case OPEN_CHANNEL: | 1554 | case OPEN_CHANNEL: |
1549 | rq = arg; | 1555 | rq = arg; |
1550 | if (rq->protocol == ISDN_P_TE_S0) | 1556 | if (rq->protocol == ISDN_P_TE_S0) |
1551 | err = open_dchannel(isac, rq); | 1557 | err = open_dchannel_caller(isac, rq, __builtin_return_address(0)); |
1552 | else | 1558 | else |
1553 | err = open_bchannel(ipac, rq); | 1559 | err = open_bchannel(ipac, rq); |
1554 | if (err) | 1560 | if (err) |
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c index de69f6828c76..741675525b53 100644 --- a/drivers/isdn/hardware/mISDN/w6692.c +++ b/drivers/isdn/hardware/mISDN/w6692.c | |||
@@ -1176,10 +1176,10 @@ w6692_l1callback(struct dchannel *dch, u32 cmd) | |||
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | static int | 1178 | static int |
1179 | open_dchannel(struct w6692_hw *card, struct channel_req *rq) | 1179 | open_dchannel(struct w6692_hw *card, struct channel_req *rq, void *caller) |
1180 | { | 1180 | { |
1181 | pr_debug("%s: %s dev(%d) open from %p\n", card->name, __func__, | 1181 | pr_debug("%s: %s dev(%d) open from %p\n", card->name, __func__, |
1182 | card->dch.dev.id, __builtin_return_address(1)); | 1182 | card->dch.dev.id, caller); |
1183 | if (rq->protocol != ISDN_P_TE_S0) | 1183 | if (rq->protocol != ISDN_P_TE_S0) |
1184 | return -EINVAL; | 1184 | return -EINVAL; |
1185 | if (rq->adr.channel == 1) | 1185 | if (rq->adr.channel == 1) |
@@ -1207,7 +1207,7 @@ w6692_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg) | |||
1207 | case OPEN_CHANNEL: | 1207 | case OPEN_CHANNEL: |
1208 | rq = arg; | 1208 | rq = arg; |
1209 | if (rq->protocol == ISDN_P_TE_S0) | 1209 | if (rq->protocol == ISDN_P_TE_S0) |
1210 | err = open_dchannel(card, rq); | 1210 | err = open_dchannel(card, rq, __builtin_return_address(0)); |
1211 | else | 1211 | else |
1212 | err = open_bchannel(card, rq); | 1212 | err = open_bchannel(card, rq); |
1213 | if (err) | 1213 | if (err) |