lkml.org 
[lkml]   [2018]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] soc: Convert to using %pOFn instead of device_node.name
    From
    Date
    On 08/28/2018 03:29 PM, Li Yang wrote:
    > On Tue, Aug 28, 2018 at 5:16 PM Tyrel Datwyler
    > <tyreld@linux.vnet.ibm.com> wrote:
    >>
    >> On 08/28/2018 11:48 AM, Li Yang wrote:
    >>> On Mon, Aug 27, 2018 at 8:57 PM Rob Herring <robh@kernel.org> wrote:
    >>>>
    >>>> In preparation to remove the node name pointer from struct device_node,
    >>>> convert printf users to use the %pOFn format specifier.
    >>>
    >>> Please forgive my ignorance, but what is this format specifier do
    >>> exactly? I cannot find anything listed in the printf specification
    >>> matching this. Is this something newly introduced?
    >>>
    >>> Leo
    >>>
    >>
    >> From Documentation/core-api/printk-formats.rst:
    >
    > I was trying to find it in the standard c format specifier. :(
    > Thanks a lot for the pointer.
    >

    No problem. Its worth a look through. The usual integer types are at the top, but that is followed by the pointer types which the kernel provides quite a few for a variety of things.

    >>
    >> kobjects
    >> --------
    >>
    >> ::
    >>
    >> %pOF[fnpPcCF]
    >>
    >>
    >> For printing kobject based structs (device nodes). Default behaviour is
    >> equivalent to %pOFf.
    >>
    >> - f - device node full_name
    >> - n - device node name
    >> - p - device node phandle
    >> - P - device node path spec (name + @unit)
    >> - F - device node flags
    >> - c - major compatible string
    >> - C - full compatible string
    >>
    >>
    >> -Tyrel
    >>
    >

    \
     
     \ /
      Last update: 2018-08-29 00:47    [W:3.340 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site