From patchwork Mon May 21 18:45:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10416199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C1CC600CC for ; Mon, 21 May 2018 18:47:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B56A289DA for ; Mon, 21 May 2018 18:47:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FE3A289E2; Mon, 21 May 2018 18:47:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E43F4289DA for ; Mon, 21 May 2018 18:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751253AbeEUSrF (ORCPT ); Mon, 21 May 2018 14:47:05 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:40299 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751523AbeEUSqg (ORCPT ); Mon, 21 May 2018 14:46:36 -0400 Received: by mail-qk0-f195.google.com with SMTP id r139-v6so418398qke.7; Mon, 21 May 2018 11:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iBky39f4IfIlDOKUR8Ju78/EHAI2X8Ai9lA/F76mx0c=; b=ASNmGn2xn11b32kVu1Ewo1VmAHIp9v6jhxA0CcC5I7+kNHwiBhID0DimmLBrV5rAiq AZIayC0fw/Bi1JC6dcYKeWqYIPTFLjNefoHBLSMfqgOd+d9IaNZV103zoS52xnAX4elq K02Hb/n7f5KBQxup33KHUUKtfL0KvL3ejqXsDsj/MH5fTgLFGumzkcI7c7KqFcmiEyMJ H4Pv5iDT2v/P7G8JahTfX/gFxNlNjYDryL12pkTz2jNDa7atJVQLiG5dDamE0c0Y9ZH1 f58dlgsVZYNl8JuyKvd9GLNaDcT42hzSOyonc0XLL/oCL6Qcxz5WUv2lMytdkxHvmMYK 25WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iBky39f4IfIlDOKUR8Ju78/EHAI2X8Ai9lA/F76mx0c=; b=ZQLZFMI/Sl8JNHhMK17jGmj7AiyKh2bzlm6wx/mzXRPyrC5wA8hIQ4w6SodUUUnOLL /eJftjLPvciRZUIQi7N8IWeNftje7tZEGBhYHytACf4/qVJrrXd+Wc4TSw9ef4uG7nr9 WY8E2RG17BnJttkKk+dzj6+gQiTvjRW/mZOA9I34mIt0aP4qcEvqQxgVQ/FoHtL8aDp5 zxEFw4oN93AH36uSTEOrjDDMO7d4zrgAvMANgLSgleRbn4kEWY9C06UZDid6KmUU1Zpb xivekI9FCi7S0Vh0NMFFRFdbiMI+JtoMh/16SbleI0tNpn5yeYtBjDy5bUGDKQcWFUjS rXbw== X-Gm-Message-State: ALKqPwe2lrcdd3AdT0wwPyKBiG7VLoDwOrr1sjskqtsIS9TfVy3bmFbO gK3x4RPozgt1ogHAX1v/0v/9v6bM X-Google-Smtp-Source: AB8JxZrpwAIaGh4TBkAnKMWyJmgda7Dm95JIlDxLHgwp7+I0EAO+FvUr5VI1yCpzURMRdrkNwu2D3g== X-Received: by 2002:a37:a9d4:: with SMTP id s203-v6mr12589704qke.364.1526928394995; Mon, 21 May 2018 11:46:34 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id s186-v6sm10197885qkb.53.2018.05.21.11.46.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 11:46:34 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , Grygorii Strashko , "David S. Miller" , Ivan Khoronzhuk , Andrew Morton , Keerthy , Bhumika Goyal , =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= , Richard Cochran , Lukas Wunner , Rob Herring , linux-omap@vger.kernel.org (open list:TI ETHERNET SWITCH DRIVER (CPSW)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next 2/5] net: ethernet: ti: cpts: Fix timestamp print Date: Mon, 21 May 2018 11:45:52 -0700 Message-Id: <20180521184555.21555-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180521184555.21555-1-f.fainelli@gmail.com> References: <20180521184555.21555-1-f.fainelli@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 64-bit hosts we will get the following warning: drivers/net/ethernet/ti/cpts.c: In function 'cpts_overflow_check': drivers/net/ethernet/ti/cpts.c:297:11: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type '__kernel_time_t {aka long int}' [-Wformat=] pr_debug("cpts overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec); Fix this by using an appropriate casting that works on all bit sizes. Fixes: a5c79c26e168 ("ptp: cpts: convert to the 64 bit get/set time methods.") Fixes: 87c0e764d43a ("cpts: introduce time stamping code and a PTP hardware clock.") Signed-off-by: Florian Fainelli --- drivers/net/ethernet/ti/cpts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c index 7842f094f2ef..6f63c8729afc 100644 --- a/drivers/net/ethernet/ti/cpts.c +++ b/drivers/net/ethernet/ti/cpts.c @@ -294,7 +294,8 @@ static long cpts_overflow_check(struct ptp_clock_info *ptp) delay = CPTS_SKB_TX_WORK_TIMEOUT; spin_unlock_irqrestore(&cpts->lock, flags); - pr_debug("cpts overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec); + pr_debug("cpts overflow check at %lld.%09ld\n", + (long long)ts.tv_sec, ts.tv_nsec); return (long)delay; }