23 Aug, 2017

1 commit

  • Make these const as they are only used in a copy operation.
    Done using Coccinelle.

    @match disable optional_qualifier@
    identifier s;
    @@
    static struct ptp_clock_info s = {...};

    @ref@
    position p;
    identifier match.s;
    @@
    s@p

    @good1@
    position ref.p;
    identifier match.s,f,c;
    expression e;
    @@
    (
    e = s@p
    |
    e = s@p.f
    |
    c(...,s@p.f,...)
    |
    c(...,s@p,...)
    )

    @bad depends on !good1@
    position ref.p;
    identifier match.s;
    @@
    s@p

    @depends on forall !bad disable optional_qualifier@
    identifier match.s;
    @@
    static
    + const
    struct ptp_clock_info s;

    Signed-off-by: Bhumika Goyal
    Acked-by: Richard Cochran
    Signed-off-by: David S. Miller

    Bhumika Goyal
     

20 Mar, 2017

1 commit

  • drivers/ptp/ptp_kvm.c:229:1-3: WARNING: PTR_ERR_OR_ZERO can be used

    Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

    Generated by: scripts/coccinelle/api/ptr_ret.cocci

    CC: Marcelo Tosatti
    Signed-off-by: Fengguang Wu
    Signed-off-by: Radim Krčmář

    kbuild test robot
     

17 Feb, 2017

1 commit


09 Feb, 2017

1 commit

  • Add a driver with gettime method returning hosts realtime clock.
    This allows Chrony to synchronize host and guest clocks with
    high precision (see results below).

    chronyc> sources
    MS Name/IP address Stratum Poll Reach LastRx Last sample
    ===============================================================================

    To configure Chronyd to use PHC refclock, add the
    following line to its configuration file:

    refclock PHC /dev/ptpX poll 3 dpoll -2 offset 0

    Where /dev/ptpX is the kvmclock PTP clock.

    Signed-off-by: Marcelo Tosatti
    Acked-by: Richard Cochran
    Signed-off-by: Paolo Bonzini

    Marcelo Tosatti