Skip to content
Advertisement

meaning of p in %pa[p] in the printk formats

The question is with regard to the printk formats. The documentation that I’m reading is located here

Here is an excerpt that I’m asking about:

JavaScript

What does [p] in %pa[p] stand for? What does it mean?

Advertisement

Answer

The p in [p] stands for phys_addr_t when used in %pap. This is analogous to the d in %pad stands for dma_addr_t, as seen in the cited document:

JavaScript

Since it provides no documented difference between %pa and %pap, it means that they behave the same. The contents inside the brackets indicate optional modifiers. This is seen in the definition of %*pE later in the document:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement