* [Kernel-janitors] [patch] __FUNCTION__ string concatenation
@ 2004-07-05 12:00 Clemens Buchacher
2004-09-19 15:14 ` [Kernel-janitors] [PATCH] " Clemens Buchacher
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Clemens Buchacher @ 2004-07-05 12:00 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 267 bytes --]
I've replaced the __FUNCTION__ string concatenation with the
%s placeholder and a printf parameter in
drivers/net/wireless/prism65/islpci_mgt.h, as suggested in the TODO
list.
I don't have the hardware to do a run-time check. It should not pose any
problems though.
[-- Attachment #2: func_cat.patch --]
[-- Type: text/plain, Size: 1007 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/07/04 22:08:37+02:00 drizzd@aon.at
# __FUNCTION__ string concatenation is deprecated
#
# drivers/net/wireless/prism54/islpci_mgt.h
# 2004/07/03 17:18:20+02:00 drizzd@aon.at +1 -1
# __FUNCTION__ string concatenation is deprecated
#
diff -Nru a/drivers/net/wireless/prism54/islpci_mgt.h b/drivers/net/wireless/prism54/islpci_mgt.h
--- a/drivers/net/wireless/prism54/islpci_mgt.h 2004-07-05 13:33:10 +02:00
+++ b/drivers/net/wireless/prism54/islpci_mgt.h 2004-07-05 13:33:10 +02:00
@@ -31,7 +31,7 @@
#define K_DEBUG(f, m, args...) do { if(f & m) printk(KERN_DEBUG args); } while(0)
#define DEBUG(f, args...) K_DEBUG(f, pc_debug, args)
-#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> " __FUNCTION__ "()\n", devname)
+#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> %s()\n", devname, __FUNCTION__)
extern int pc_debug;
#define init_wds 0 /* help compiler optimize away dead code */
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] [PATCH] __FUNCTION__ string concatenation
2004-07-05 12:00 [Kernel-janitors] [patch] __FUNCTION__ string concatenation Clemens Buchacher
@ 2004-09-19 15:14 ` Clemens Buchacher
2004-09-19 15:15 ` Clemens Buchacher
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Clemens Buchacher @ 2004-09-19 15:14 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 4034 bytes --]
Description: __FUNCTION__ string concatenation is deprecated
Diff against linux-2.6 up to ChangeSet@1.1938 (04/09/18 20:30:01)
arch/mips/au1000/common/usbdev.c | 4 ++--
drivers/net/gt96100eth.c | 10 +++++-----
sound/oss/au1000.c | 2 +-
sound/oss/ite8172.c | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
Status: untested
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
# sound/oss/ite8172.c
# 2004/09/20 14:52:26+02:00 drizzd@aon.at +1 -1
# __FUNCTION__ string concatenation is deprecated
#
# sound/oss/au1000.c
# 2004/09/20 14:52:26+02:00 drizzd@aon.at +1 -1
# __FUNCTION__ string concatenation is deprecated
#
# drivers/net/gt96100eth.c
# 2004/09/20 14:52:26+02:00 drizzd@aon.at +5 -5
# __FUNCTION__ string concatenation is deprecated
#
# arch/mips/au1000/common/usbdev.c
# 2004/09/20 14:52:26+02:00 drizzd@aon.at +2 -2
# __FUNCTION__ string concatenation is deprecated
#
diff -Nru a/arch/mips/au1000/common/usbdev.c b/arch/mips/au1000/common/usbdev.c
--- a/arch/mips/au1000/common/usbdev.c 2004-09-20 15:14:54 +02:00
+++ b/arch/mips/au1000/common/usbdev.c 2004-09-20 15:14:54 +02:00
@@ -351,7 +351,7 @@
{
u32 cs;
- warn(__FUNCTION__);
+ warn("%s", __FUNCTION__);
cs = au_readl(ep->reg->ctrl_stat) | USBDEV_CS_STALL;
au_writel(cs, ep->reg->ctrl_stat);
@@ -363,7 +363,7 @@
{
u32 cs;
- warn(__FUNCTION__);
+ warn("%s", __FUNCTION__);
cs = au_readl(ep->reg->ctrl_stat) & ~USBDEV_CS_STALL;
au_writel(cs, ep->reg->ctrl_stat);
diff -Nru a/drivers/net/gt96100eth.c b/drivers/net/gt96100eth.c
--- a/drivers/net/gt96100eth.c 2004-09-20 15:14:54 +02:00
+++ b/drivers/net/gt96100eth.c 2004-09-20 15:14:54 +02:00
@@ -73,7 +73,7 @@
static void dump_skb(int dbg_lvl, struct net_device *dev,
struct sk_buff *skb);
static void dump_hw_addr(int dbg_lvl, struct net_device *dev,
- const char* pfx, unsigned char* addr_str);
+ const char* pfx, const char* func, unsigned char* addr_str);
static void update_stats(struct gt96100_private *gp);
static void abort(struct net_device *dev, u32 abort_bits);
static void hard_stop(struct net_device *dev);
@@ -336,13 +336,13 @@
static void
dump_hw_addr(int dbg_lvl, struct net_device *dev, const char* pfx,
- unsigned char* addr_str)
+ const char* func, unsigned char* addr_str)
{
int i;
char buf[100], octet[5];
if (dbg_lvl <= GT96100_DEBUG) {
- strcpy(buf, pfx);
+ sprintf(buf, pfx, func);
for (i = 0; i < 6; i++) {
sprintf(octet, "%2.2x%s",
addr_str[i], i<5 ? ":" : "\n");
@@ -710,7 +710,7 @@
info("%s found at 0x%x, irq %d\n",
chip_name(gp->chip_rev), gtif->iobase, gtif->irq);
- dump_hw_addr(0, dev, "HW Address ", dev->dev_addr);
+ dump_hw_addr(0, dev, "%s: HW Address ", __FUNCTION__, dev->dev_addr);
info("%s chip revision=%d\n", chip_name(gp->chip_rev), gp->chip_rev);
info("%s ethernet port %d\n", chip_name(gp->chip_rev), gp->port_num);
info("external PHY ID1=0x%04x, ID2=0x%04x\n", phy_id1, phy_id2);
@@ -1490,7 +1490,7 @@
gt96100_add_hash_entry(dev, dev->dev_addr);
for (mcptr = dev->mc_list; mcptr; mcptr = mcptr->next) {
- dump_hw_addr(2, dev, __FUNCTION__ ": addr=",
+ dump_hw_addr(2, dev, "%s: addr=", __FUNCTION__,
mcptr->dmi_addr);
gt96100_add_hash_entry(dev, mcptr->dmi_addr);
}
diff -Nru a/sound/oss/au1000.c b/sound/oss/au1000.c
--- a/sound/oss/au1000.c 2004-09-20 15:14:54 +02:00
+++ b/sound/oss/au1000.c 2004-09-20 15:14:54 +02:00
@@ -1317,7 +1317,7 @@
unsigned long size;
int ret = 0;
- dbg(__FUNCTION__);
+ dbg("%s", __FUNCTION__);
lock_kernel();
down(&s->sem);
diff -Nru a/sound/oss/ite8172.c b/sound/oss/ite8172.c
--- a/sound/oss/ite8172.c 2004-09-20 15:14:54 +02:00
+++ b/sound/oss/ite8172.c 2004-09-20 15:14:54 +02:00
@@ -1847,7 +1847,7 @@
struct it8172_state *s = (struct it8172_state *)file->private_data;
#ifdef IT8172_VERBOSE_DEBUG
- dbg(__FUNCTION__);
+ dbg("%s", __FUNCTION__);
#endif
lock_kernel();
if (file->f_mode & FMODE_WRITE)
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] [PATCH] __FUNCTION__ string concatenation
2004-07-05 12:00 [Kernel-janitors] [patch] __FUNCTION__ string concatenation Clemens Buchacher
2004-09-19 15:14 ` [Kernel-janitors] [PATCH] " Clemens Buchacher
@ 2004-09-19 15:15 ` Clemens Buchacher
2004-09-19 15:25 ` Clemens Buchacher
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Clemens Buchacher @ 2004-09-19 15:15 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
Description: __FUNCTION__ string concatenation is deprecated
Diff against linux-2.6 up to ChangeSet@1.1938 (04/09/18 20:30:01)
drivers/net/wireless/prism54/islpci_mgt.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Status: compile time tested
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
# drivers/net/wireless/prism54/islpci_mgt.h
# 2004/09/20 14:52:26+02:00 drizzd@aon.at +1 -1
# __FUNCTION__ string concatenation is deprecated
diff -Nru a/drivers/net/wireless/prism54/islpci_mgt.h b/drivers/net/wireless/prism54/islpci_mgt.h
--- a/drivers/net/wireless/prism54/islpci_mgt.h 2004-09-20 15:14:54 +02:00
+++ b/drivers/net/wireless/prism54/islpci_mgt.h 2004-09-20 15:14:54 +02:00
@@ -31,7 +31,7 @@
#define K_DEBUG(f, m, args...) do { if(f & m) printk(KERN_DEBUG args); } while(0)
#define DEBUG(f, args...) K_DEBUG(f, pc_debug, args)
-#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> " __FUNCTION__ "()\n", devname)
+#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> %s()\n", devname, __FUNCTION__)
extern int pc_debug;
#define init_wds 0 /* help compiler optimize away dead code */
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Kernel-janitors] [PATCH] __FUNCTION__ string concatenation
2004-07-05 12:00 [Kernel-janitors] [patch] __FUNCTION__ string concatenation Clemens Buchacher
2004-09-19 15:14 ` [Kernel-janitors] [PATCH] " Clemens Buchacher
2004-09-19 15:15 ` Clemens Buchacher
@ 2004-09-19 15:25 ` Clemens Buchacher
2004-09-20 16:51 ` maximilian attems
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Clemens Buchacher @ 2004-09-19 15:25 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
Description: __FUNCTION__ string concatenation is deprecated
Diff against linux-2.6 up to ChangeSet@1.1938 (04/09/18 20:30:01)
arch/mips/au1000/db1x00/mirage_ts.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Status: untested
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
# arch/mips/au1000/db1x00/mirage_ts.c
# 2004/09/20 14:52:26+02:00 drizzd@aon.at +1 -1
# __FUNCTION__ string concatenation is deprecated
diff -Nru a/arch/mips/au1000/db1x00/mirage_ts.c b/arch/mips/au1000/db1x00/mirage_ts.c
--- a/arch/mips/au1000/db1x00/mirage_ts.c 2004-09-20 15:14:54 +02:00
+++ b/arch/mips/au1000/db1x00/mirage_ts.c 2004-09-20 15:14:54 +02:00
@@ -68,7 +68,7 @@
#define err(format, arg...) printk(KERN_ERR TS_NAME ": " format "\n" , ## arg)
#define info(format, arg...) printk(KERN_INFO TS_NAME ": " format "\n" , ## arg)
#define warn(format, arg...) printk(KERN_WARNING TS_NAME ": " format "\n" , ## arg)
-#define DPRINTK(format, arg...) printk(__FUNCTION__ ": " format "\n" , ## arg)
+#define DPRINTK(format, arg...) printk("%s: " format "\n", __FUNCTION__ , ## arg)
#define PEN_DOWN_IRQ AU1000_GPIO_7
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] __FUNCTION__ string concatenation
2004-07-05 12:00 [Kernel-janitors] [patch] __FUNCTION__ string concatenation Clemens Buchacher
` (2 preceding siblings ...)
2004-09-19 15:25 ` Clemens Buchacher
@ 2004-09-20 16:51 ` maximilian attems
2004-09-20 16:59 ` maximilian attems
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: maximilian attems @ 2004-09-20 16:51 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
On Mon, 20 Sep 2004, Clemens Buchacher wrote:
..
> diff -Nru a/drivers/net/wireless/prism54/islpci_mgt.h b/drivers/net/wireless/prism54/islpci_mgt.h
> --- a/drivers/net/wireless/prism54/islpci_mgt.h 2004-09-20 15:14:54 +02:00
> +++ b/drivers/net/wireless/prism54/islpci_mgt.h 2004-09-20 15:14:54 +02:00
> @@ -31,7 +31,7 @@
> #define K_DEBUG(f, m, args...) do { if(f & m) printk(KERN_DEBUG args); } while(0)
> #define DEBUG(f, args...) K_DEBUG(f, pc_debug, args)
>
> -#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> " __FUNCTION__ "()\n", devname)
> +#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> %s()\n", devname, __FUNCTION__)
TRACE() is used nowhere, there is a better one, which completly
removes it in latest kj tree.
>
> extern int pc_debug;
> #define init_wds 0 /* help compiler optimize away dead code */
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> http://lists.osdl.org/mailman/listinfo/kernel-janitors
--
maks
kernel janitor http://janitor.kernelnewbies.org/
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] __FUNCTION__ string concatenation
2004-07-05 12:00 [Kernel-janitors] [patch] __FUNCTION__ string concatenation Clemens Buchacher
` (3 preceding siblings ...)
2004-09-20 16:51 ` maximilian attems
@ 2004-09-20 16:59 ` maximilian attems
2004-09-22 13:35 ` Clemens Buchacher
2004-09-22 15:36 ` Steve Longerbeam
6 siblings, 0 replies; 8+ messages in thread
From: maximilian attems @ 2004-09-20 16:59 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
On Mon, 20 Sep 2004, Clemens Buchacher wrote:
> Description: __FUNCTION__ string concatenation is deprecated
>
> Diff against linux-2.6 up to ChangeSet@1.1938 (04/09/18 20:30:01)
>
> arch/mips/au1000/common/usbdev.c | 4 ++--
> drivers/net/gt96100eth.c | 10 +++++-----
> sound/oss/au1000.c | 2 +-
> sound/oss/ite8172.c | 2 +-
> 4 files changed, 9 insertions(+), 9 deletions(-)
>
> Status: untested
>
> Signed-off-by: Clemens Buchacher <drizzd@aon.at>
>
would be cool to get those in 4 separeted mails and compile tested.
see also "the perfect patch" by akpm
-> http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
thanks
a++
--
maks
kernel janitor http://janitor.kernelnewbies.org/
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] __FUNCTION__ string concatenation
2004-07-05 12:00 [Kernel-janitors] [patch] __FUNCTION__ string concatenation Clemens Buchacher
` (4 preceding siblings ...)
2004-09-20 16:59 ` maximilian attems
@ 2004-09-22 13:35 ` Clemens Buchacher
2004-09-22 15:36 ` Steve Longerbeam
6 siblings, 0 replies; 8+ messages in thread
From: Clemens Buchacher @ 2004-09-22 13:35 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
On Mon, Sep 20, 2004 at 06:59:28PM +0200, maximilian attems wrote:
> On Mon, 20 Sep 2004, Clemens Buchacher wrote:
> > arch/mips/au1000/common/usbdev.c | 4 ++--
> > drivers/net/gt96100eth.c | 10 +++++-----
> > sound/oss/au1000.c | 2 +-
> > sound/oss/ite8172.c | 2 +-
> > 4 files changed, 9 insertions(+), 9 deletions(-)
> >
> > Status: untested
> >
> would be cool to get those in 4 separeted mails and compile tested.
Unfortunately, the whole MIPS tree seems to be in no condition to compile. It
would probably be a better idea to apply this patch to the linux-mips branch.
I will do that as soon as I can free enough bandwidth to pull from
linux-mips.bkbits.net.
Clemens
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Kernel-janitors] [PATCH] __FUNCTION__ string concatenation
2004-07-05 12:00 [Kernel-janitors] [patch] __FUNCTION__ string concatenation Clemens Buchacher
` (5 preceding siblings ...)
2004-09-22 13:35 ` Clemens Buchacher
@ 2004-09-22 15:36 ` Steve Longerbeam
6 siblings, 0 replies; 8+ messages in thread
From: Steve Longerbeam @ 2004-09-22 15:36 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1.1: Type: text/plain, Size: 927 bytes --]
Hi Clemens, thanks a bunch for doing this work!
I have access to these MIPS boards so I can test
these drivers soon.
Steve
Clemens Buchacher wrote:
>On Mon, Sep 20, 2004 at 06:59:28PM +0200, maximilian attems wrote:
>
>
>>On Mon, 20 Sep 2004, Clemens Buchacher wrote:
>>
>>
>>> arch/mips/au1000/common/usbdev.c | 4 ++--
>>> drivers/net/gt96100eth.c | 10 +++++-----
>>> sound/oss/au1000.c | 2 +-
>>> sound/oss/ite8172.c | 2 +-
>>> 4 files changed, 9 insertions(+), 9 deletions(-)
>>>
>>>Status: untested
>>>
>>>
>>>
>>would be cool to get those in 4 separeted mails and compile tested.
>>
>>
>
>Unfortunately, the whole MIPS tree seems to be in no condition to compile. It
>would probably be a better idea to apply this patch to the linux-mips branch.
>
>I will do that as soon as I can free enough bandwidth to pull from
>linux-mips.bkbits.net.
>
>Clemens
>
>
[-- Attachment #1.2: Type: text/html, Size: 1416 bytes --]
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-09-22 15:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-05 12:00 [Kernel-janitors] [patch] __FUNCTION__ string concatenation Clemens Buchacher
2004-09-19 15:14 ` [Kernel-janitors] [PATCH] " Clemens Buchacher
2004-09-19 15:15 ` Clemens Buchacher
2004-09-19 15:25 ` Clemens Buchacher
2004-09-20 16:51 ` maximilian attems
2004-09-20 16:59 ` maximilian attems
2004-09-22 13:35 ` Clemens Buchacher
2004-09-22 15:36 ` Steve Longerbeam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.