History

PNP: Add missing casts in printk() arguments

Some resource_size_t values are fed to printk() without handling the fact that they can have different size depending on your .config.

Pierre Ossman committed 20 years ago

Commit 2131ca81 parent 56690211 file · +6 −6Browse files

Unified · Split

drivers/pnp/interface.c+6−6
@@ -265,8 +265,8 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at · 264 unmodified lines
265265 pnp_printf(buffer," disabled\n");
266266 else
267267 pnp_printf(buffer," 0x%llx-0x%llx\n",
268− pnp_port_start(dev, i),
269− pnp_port_end(dev, i));
268+ (unsigned long long)pnp_port_start(dev, i),
269+ (unsigned long long)pnp_port_end(dev, i));
270270 }
271271 }
272272 for (i = 0; i < PNP_MAX_MEM; i++) {
@@ -276,8 +276,8 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at · 3 unmodified lines
276276 pnp_printf(buffer," disabled\n");
277277 else
278278 pnp_printf(buffer," 0x%llx-0x%llx\n",
279− pnp_mem_start(dev, i),
280− pnp_mem_end(dev, i));
279+ (unsigned long long)pnp_mem_start(dev, i),
280+ (unsigned long long)pnp_mem_end(dev, i));
281281 }
282282 }
283283 for (i = 0; i < PNP_MAX_IRQ; i++) {
@@ -287,7 +287,7 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at · 3 unmodified lines
287287 pnp_printf(buffer," disabled\n");
288288 else
289289 pnp_printf(buffer," %lld\n",
290− pnp_irq(dev, i));
290+ (unsigned long long)pnp_irq(dev, i));
291291 }
292292 }
293293 for (i = 0; i < PNP_MAX_DMA; i++) {
@@ -297,7 +297,7 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at · 3 unmodified lines
297297 pnp_printf(buffer," disabled\n");
298298 else
299299 pnp_printf(buffer," %lld\n",
300− pnp_dma(dev, i));
300+ (unsigned long long)pnp_dma(dev, i));
301301 }
302302 }
303303 ret = (buffer->curr - buf);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t