Commit f45ba776da4fe6c9a9eddd42b0fd5d1f15c260f3

Authored by Joe Perches
Committed by Greg Kroah-Hartman
1 parent 759f363426

USB: Convert concatenated __FILE__ to %s, __FILE__

Reduces string space a bit
Neaten a macro redefine of dbg

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 11 changed files with 41 additions and 39 deletions Side-by-side Diff

drivers/usb/host/ehci-ppc-of.c
... ... @@ -134,21 +134,21 @@
134 134 hcd->rsrc_len = res.end - res.start + 1;
135 135  
136 136 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
137   - printk(KERN_ERR __FILE__ ": request_mem_region failed\n");
  137 + printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
138 138 rv = -EBUSY;
139 139 goto err_rmr;
140 140 }
141 141  
142 142 irq = irq_of_parse_and_map(dn, 0);
143 143 if (irq == NO_IRQ) {
144   - printk(KERN_ERR __FILE__ ": irq_of_parse_and_map failed\n");
  144 + printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__);
145 145 rv = -EBUSY;
146 146 goto err_irq;
147 147 }
148 148  
149 149 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
150 150 if (!hcd->regs) {
151   - printk(KERN_ERR __FILE__ ": ioremap failed\n");
  151 + printk(KERN_ERR "%s: ioremap failed\n", __FILE__);
152 152 rv = -ENOMEM;
153 153 goto err_ioremap;
154 154 }
155 155  
... ... @@ -161,9 +161,9 @@
161 161 ehci->ohci_hcctrl_reg = ioremap(res.start +
162 162 OHCI_HCCTRL_OFFSET, OHCI_HCCTRL_LEN);
163 163 else
164   - pr_debug(__FILE__ ": no ohci offset in fdt\n");
  164 + pr_debug("%s: no ohci offset in fdt\n", __FILE__);
165 165 if (!ehci->ohci_hcctrl_reg) {
166   - pr_debug(__FILE__ ": ioremap for ohci hcctrl failed\n");
  166 + pr_debug("%s: ioremap for ohci hcctrl failed\n", __FILE__);
167 167 } else {
168 168 ehci->has_amcc_usb23 = 1;
169 169 }
... ... @@ -241,7 +241,7 @@
241 241 else
242 242 release_mem_region(res.start, 0x4);
243 243 else
244   - pr_debug(__FILE__ ": no ohci offset in fdt\n");
  244 + pr_debug("%s: no ohci offset in fdt\n", __FILE__);
245 245 of_node_put(np);
246 246 }
247 247  
drivers/usb/host/ehci-xilinx-of.c
... ... @@ -177,21 +177,21 @@
177 177 hcd->rsrc_len = res.end - res.start + 1;
178 178  
179 179 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
180   - printk(KERN_ERR __FILE__ ": request_mem_region failed\n");
  180 + printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
181 181 rv = -EBUSY;
182 182 goto err_rmr;
183 183 }
184 184  
185 185 irq = irq_of_parse_and_map(dn, 0);
186 186 if (irq == NO_IRQ) {
187   - printk(KERN_ERR __FILE__ ": irq_of_parse_and_map failed\n");
  187 + printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__);
188 188 rv = -EBUSY;
189 189 goto err_irq;
190 190 }
191 191  
192 192 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
193 193 if (!hcd->regs) {
194   - printk(KERN_ERR __FILE__ ": ioremap failed\n");
  194 + printk(KERN_ERR "%s: ioremap failed\n", __FILE__);
195 195 rv = -ENOMEM;
196 196 goto err_ioremap;
197 197 }
drivers/usb/host/ohci-dbg.c
... ... @@ -53,13 +53,13 @@
53 53 int i, len;
54 54  
55 55 if (usb_pipecontrol (pipe)) {
56   - printk (KERN_DEBUG __FILE__ ": setup(8):");
  56 + printk (KERN_DEBUG "%s: setup(8):", __FILE__);
57 57 for (i = 0; i < 8 ; i++)
58 58 printk (" %02x", ((__u8 *) urb->setup_packet) [i]);
59 59 printk ("\n");
60 60 }
61 61 if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) {
62   - printk (KERN_DEBUG __FILE__ ": data(%d/%d):",
  62 + printk (KERN_DEBUG "%s: data(%d/%d):", __FILE__,
63 63 urb->actual_length,
64 64 urb->transfer_buffer_length);
65 65 len = usb_pipeout (pipe)?
drivers/usb/host/ohci-lh7a404.c
... ... @@ -28,8 +28,8 @@
28 28  
29 29 static void lh7a404_start_hc(struct platform_device *dev)
30 30 {
31   - printk(KERN_DEBUG __FILE__
32   - ": starting LH7A404 OHCI USB Controller\n");
  31 + printk(KERN_DEBUG "%s: starting LH7A404 OHCI USB Controller\n",
  32 + __FILE__);
33 33  
34 34 /*
35 35 * Now, carefully enable the USB clock, and take
36 36  
... ... @@ -39,14 +39,13 @@
39 39 udelay(1000);
40 40 USBH_CMDSTATUS = OHCI_HCR;
41 41  
42   - printk(KERN_DEBUG __FILE__
43   - ": Clock to USB host has been enabled \n");
  42 + printk(KERN_DEBUG "%s: Clock to USB host has been enabled \n", __FILE__);
44 43 }
45 44  
46 45 static void lh7a404_stop_hc(struct platform_device *dev)
47 46 {
48   - printk(KERN_DEBUG __FILE__
49   - ": stopping LH7A404 OHCI USB Controller\n");
  47 + printk(KERN_DEBUG "%s: stopping LH7A404 OHCI USB Controller\n",
  48 + __FILE__);
50 49  
51 50 CSC_PWRCNT &= ~CSC_PWRCNT_USBH_EN; /* Disable clock */
52 51 }
drivers/usb/host/ohci-ppc-of.c
... ... @@ -114,21 +114,21 @@
114 114 hcd->rsrc_len = res.end - res.start + 1;
115 115  
116 116 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
117   - printk(KERN_ERR __FILE__ ": request_mem_region failed\n");
  117 + printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
118 118 rv = -EBUSY;
119 119 goto err_rmr;
120 120 }
121 121  
122 122 irq = irq_of_parse_and_map(dn, 0);
123 123 if (irq == NO_IRQ) {
124   - printk(KERN_ERR __FILE__ ": irq_of_parse_and_map failed\n");
  124 + printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__);
125 125 rv = -EBUSY;
126 126 goto err_irq;
127 127 }
128 128  
129 129 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
130 130 if (!hcd->regs) {
131   - printk(KERN_ERR __FILE__ ": ioremap failed\n");
  131 + printk(KERN_ERR "%s: ioremap failed\n", __FILE__);
132 132 rv = -ENOMEM;
133 133 goto err_ioremap;
134 134 }
... ... @@ -169,7 +169,7 @@
169 169 } else
170 170 release_mem_region(res.start, 0x4);
171 171 } else
172   - pr_debug(__FILE__ ": cannot get ehci offset from fdt\n");
  172 + pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__);
173 173 }
174 174  
175 175 iounmap(hcd->regs);
drivers/usb/host/ohci-ppc-soc.c
... ... @@ -41,14 +41,14 @@
41 41  
42 42 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
43 43 if (!res) {
44   - pr_debug(__FILE__ ": no irq\n");
  44 + pr_debug("%s: no irq\n", __FILE__);
45 45 return -ENODEV;
46 46 }
47 47 irq = res->start;
48 48  
49 49 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
50 50 if (!res) {
51   - pr_debug(__FILE__ ": no reg addr\n");
  51 + pr_debug("%s: no reg addr\n", __FILE__);
52 52 return -ENODEV;
53 53 }
54 54  
55 55  
... ... @@ -59,14 +59,14 @@
59 59 hcd->rsrc_len = res->end - res->start + 1;
60 60  
61 61 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
62   - pr_debug(__FILE__ ": request_mem_region failed\n");
  62 + pr_debug("%s: request_mem_region failed\n", __FILE__);
63 63 retval = -EBUSY;
64 64 goto err1;
65 65 }
66 66  
67 67 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
68 68 if (!hcd->regs) {
69   - pr_debug(__FILE__ ": ioremap failed\n");
  69 + pr_debug("%s: ioremap failed\n", __FILE__);
70 70 retval = -ENOMEM;
71 71 goto err2;
72 72 }
drivers/usb/host/ohci-sa1111.c
... ... @@ -31,8 +31,8 @@
31 31 {
32 32 unsigned int usb_rst = 0;
33 33  
34   - printk(KERN_DEBUG __FILE__
35   - ": starting SA-1111 OHCI USB Controller\n");
  34 + printk(KERN_DEBUG "%s: starting SA-1111 OHCI USB Controller\n",
  35 + __FILE__);
36 36  
37 37 #ifdef CONFIG_SA1100_BADGE4
38 38 if (machine_is_badge4()) {
... ... @@ -65,8 +65,8 @@
65 65 static void sa1111_stop_hc(struct sa1111_dev *dev)
66 66 {
67 67 unsigned int usb_rst;
68   - printk(KERN_DEBUG __FILE__
69   - ": stopping SA-1111 OHCI USB Controller\n");
  68 + printk(KERN_DEBUG "%s: stopping SA-1111 OHCI USB Controller\n",
  69 + __FILE__);
70 70  
71 71 /*
72 72 * Put the USB host controller into reset.
drivers/usb/misc/adutux.c
... ... @@ -38,7 +38,7 @@
38 38 #define dbg(lvl, format, arg...) \
39 39 do { \
40 40 if (debug >= lvl) \
41   - printk(KERN_DEBUG __FILE__ " : " format " \n", ## arg); \
  41 + printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
42 42 } while (0)
43 43  
44 44  
... ... @@ -132,8 +132,8 @@
132 132 if (debug < level)
133 133 return;
134 134  
135   - printk(KERN_DEBUG __FILE__": %s - length = %d, data = ",
136   - function, size);
  135 + printk(KERN_DEBUG "%s: %s - length = %d, data = ",
  136 + __FILE__, function, size);
137 137 for (i = 0; i < size; ++i)
138 138 printk("%.2x ", data[i]);
139 139 printk("\n");
drivers/usb/misc/ldusb.c
... ... @@ -798,7 +798,7 @@
798 798 /* register this driver with the USB subsystem */
799 799 retval = usb_register(&ld_usb_driver);
800 800 if (retval)
801   - err("usb_register failed for the "__FILE__" driver. Error number %d\n", retval);
  801 + err("usb_register failed for the %s driver. Error number %d\n", __FILE__, retval);
802 802  
803 803 return retval;
804 804 }
drivers/usb/misc/legousbtower.c
... ... @@ -95,9 +95,12 @@
95 95  
96 96 /* Use our own dbg macro */
97 97 #undef dbg
98   -#define dbg(lvl, format, arg...) do { if (debug >= lvl) printk(KERN_DEBUG __FILE__ ": " format "\n", ## arg); } while (0)
  98 +#define dbg(lvl, format, arg...) \
  99 +do { \
  100 + if (debug >= lvl) \
  101 + printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
  102 +} while (0)
99 103  
100   -
101 104 /* Version Information */
102 105 #define DRIVER_VERSION "v0.96"
103 106 #define DRIVER_AUTHOR "Juergen Stuber <starblue@sourceforge.net>"
... ... @@ -302,7 +305,7 @@
302 305 if (debug < level)
303 306 return;
304 307  
305   - printk (KERN_DEBUG __FILE__": %s - length = %d, data = ", function, size);
  308 + printk (KERN_DEBUG "%s: %s - length = %d, data = ", __FILE__, function, size);
306 309 for (i = 0; i < size; ++i) {
307 310 printk ("%.2x ", data[i]);
308 311 }
... ... @@ -1055,7 +1058,7 @@
1055 1058 /* register this driver with the USB subsystem */
1056 1059 result = usb_register(&tower_driver);
1057 1060 if (result < 0) {
1058   - err("usb_register failed for the "__FILE__" driver. Error number %d", result);
  1061 + err("usb_register failed for the %s driver. Error number %d", __FILE__, result);
1059 1062 retval = -1;
1060 1063 goto exit;
1061 1064 }
drivers/usb/serial/omninet.c
... ... @@ -218,8 +218,8 @@
218 218  
219 219 if (debug && header->oh_xxx != 0x30) {
220 220 if (urb->actual_length) {
221   - printk(KERN_DEBUG __FILE__
222   - ": omninet_read %d: ", header->oh_len);
  221 + printk(KERN_DEBUG "%s: omninet_read %d: ",
  222 + __FILE__, header->oh_len);
223 223 for (i = 0; i < (header->oh_len +
224 224 OMNINET_HEADERLEN); i++)
225 225 printk("%.2x ", data[i]);