From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74EF3C3DA4A for ; Thu, 22 Aug 2024 11:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Plot1QOWDDCo/VvxGfxfra+xZ8QO2+Hpyl/aQhLY0Hs=; b=db9DzODShq2SxA1QfKgzRlFqNi puem8upUCINjZTRwYnKnnVq+2sdJuUmjzlPqcFMRlZBCUJjjtpLXhsbmlwSLDdwuJwNRoMiRd9Lqp JaJdcm7j55gM50nQV6rY9dbTRLBDKOrkYc/kfITahsiE78TbgkWdAI2/Ta3aaAYB3SL/Jo31fJLw+ JQKF6oudWMiYzZZBGceMst7OTTZA3t/BsQ0L6a+81nm3kBxz/62py7jEY2VeGky7bKrg+gSvdYBCS kBrOzJ6zw8jzseZ3Ri15eJWpQOwhJXM1p1DF+sSn6KonVQxuNIOYEAGxVUtf4G7y5gabGgzSwCvXD YqPKMCYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh6Kw-0000000Cdu7-3Wte; Thu, 22 Aug 2024 11:50:42 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh6KC-0000000Cdf7-1iLq for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 11:49:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 643F461231; Thu, 22 Aug 2024 11:49:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C597C32782; Thu, 22 Aug 2024 11:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724327395; bh=Dt4LFrbNnXt5IZdzzmCGwGIQswW/M/ytO2I8SZAYO2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iOffhufbh+OB6mKyaAl/rLeZHOr1Z1boFD8T3qeWC6ZAHyUeZoJInBFPSHpnKDphg wHbxTpD1Py+lmvdiCRHhssuSYRZic5RSnq6IIY8u3fRxAu9emOdnV1q1HuT1cNeXZb vswlvoDOWx2TqKmcBQT0q0GNYdq5KlfQIcUE4s0ib5ZzJGuxK5sUAsciKHp52yuFqY WQxNRWKMTjleOk9KbFlmU444hnywblUsCrHBHuVTce0IMwkVvnH0FF4KO+MTnzSJCu B+Qr4TFYcZZl8GWr/Cmkw5WyeIUwQMOvIoMrVEHspAtORoIyqFlI82+0xfokZK3+dE N6rckoG/TIEmg== Date: Thu, 22 Aug 2024 12:49:48 +0100 From: Simon Horman To: David Woodhouse Cc: Richard Cochran , Peter Hilber , linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rtc@vger.kernel.org, "Ridoux, Julien" , virtio-dev@lists.linux.dev, "Luu, Ryan" , "Chashper, David" , "Mohamed Abuelfotoh, Hazem" , "Christopher S . Hall" , Jason Wang , John Stultz , "Michael S . Tsirkin" , netdev@vger.kernel.org, Stephen Boyd , Thomas Gleixner , Xuan Zhuo , Marc Zyngier , Mark Rutland , Daniel Lezcano , Alessandro Zummo , Alexandre Belloni , qemu-devel Subject: Re: [PATCH v4] ptp: Add vDSO-style vmclock support Message-ID: <20240822114948.GM2164@kernel.org> References: <410bbef9771ef8aa51704994a70d5965e367e2ce.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <410bbef9771ef8aa51704994a70d5965e367e2ce.camel@infradead.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_044956_532938_568639B1 X-CRM114-Status: GOOD ( 15.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 21, 2024 at 10:50:47PM +0100, David Woodhouse wrote: ... > diff --git a/drivers/ptp/ptp_vmclock.c b/drivers/ptp/ptp_vmclock.c ... > +#define VMCLOCK_FIELD_PRESENT(_c, _f) \ > + (_c)->size >= (offsetof(struct vmclock_abi, _f) + \ > + sizeof((_c)->_f)) > + ... > +static int vmclock_probe(struct platform_device *pdev) ... > + /* If there is valid clock information, register a PTP clock */ > + if (VMCLOCK_FIELD_PRESENT(st->clk, time_frac_sec)) { Hi David, Sorry to be always the one with the nit-pick. Sparse complains about the line above, I believe because the type of st->clk->size is __le32. .../ptp_vmclock.c:562:13: warning: restricted __le32 degrades to integer > + /* Can return a silent NULL, or an error. */ > + st->ptp_clock = vmclock_ptp_register(dev, st); > + if (IS_ERR(st->ptp_clock)) { > + ret = PTR_ERR(st->ptp_clock); > + st->ptp_clock = NULL; > + vmclock_remove(pdev); > + goto out; > + } > + } ...