From patchwork Mon Nov 27 11:39:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 119680 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp128373qgn; Mon, 27 Nov 2017 03:40:49 -0800 (PST) X-Google-Smtp-Source: AGs4zMZDXtR5oSGmzp7ZgsqyeJDk2T6xJM49Q6/qjlEcBlNIjr886ebg97jUghHcaQHHKBdSibal X-Received: by 10.84.233.207 with SMTP id m15mr37534005pln.424.1511782849345; Mon, 27 Nov 2017 03:40:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511782849; cv=none; d=google.com; s=arc-20160816; b=vXciHWCKg8gNlEaWCNdHggKfSKzqR9FRrHFHFmLdUS5kDrZlrzR4nicQCju/W6yaRt Xh6CdyDMVcYxXrkd7cpFxdJNXKuQ84jWck/XHaHfdw+uep5OvmsaLf1Mw8PthS4PaQlV /18z63gG5tLdOegWz15AtbOAk9PPVm/bBNVx5VClYm27ASxdWDiHVfoMy0g0GKci5L2n yUGH7VNekIS7cev5Ncxf3+dqx6NXL16u6cZTPaW4H0vBGgm12GQtXLwyCpHblK5OfZvq DV6siEdoXJO3xXwlZwHCFJ20/WWrT4xpT1001xehRInm/knGuZZS/WPBiMOSseu2sOT5 xkUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=zvyOM1Gh3EKf+nkokwZUO3vmyljRSLP99KDcursz8I0=; b=JRrnqyddPFqt/4uRlPRyG0nCIhsa23HkiIs3HLThp/wQx890Tho8mcbnD5gLZ+ClVH +D3C3uVy5RIMFQCpD8begHq8yD2k3YTZIHwViWPJVFnqaEkCzQZ+i9x9iy0shMx4bG0D Bo4odzFZkvqcCuluP32eN2LCNtrltnoks9iL5VIgD49AIg/iiMTLnNpXieJq30+HgvLE jnDff+de2Z79APW34vYYK9ENciAgjYYlVL16SwCAMAdhnCZTMoriBTxpObJn9eqJJ5T3 18rFxaItiIbtVbfzPqUm+8Qa+YMljqu832dxpLxguI0YhdeIhNoIpWNI7hxnbEl3c339 0HJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si1400368plm.825.2017.11.27.03.40.48; Mon, 27 Nov 2017 03:40:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbdK0Lkq (ORCPT + 7 others); Mon, 27 Nov 2017 06:40:46 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:59578 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790AbdK0Lka (ORCPT ); Mon, 27 Nov 2017 06:40:30 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lmel1-1erWOT2tqV-00aDBt; Mon, 27 Nov 2017 12:40:22 +0100 From: Arnd Bergmann To: Manish Chopra , Rahul Verma , Dept-GELinuxNICDev@cavium.com Cc: y2038@lists.linaro.org, Arnd Bergmann , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] netxen: remove timespec usage Date: Mon, 27 Nov 2017 12:39:57 +0100 Message-Id: <20171127114008.2467872-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:baUsl9EoHZ4Bw7huwAwZ38hLePM3upCjfaNy7JudIsmuOEktbti 6tiv/ScPD5lWkprYUN+C9OOmNNMHLs8NiRaPWpZNRNaXpYZslgJIvvQe6QY6uhLmu5JY9Al 61vnMLZzu9cC3ddxj1MDF40fZdzuIKj3Sr2wCxDktKCyZRBOe1l7XgqTshM12fprtb54hPt mazBRaJXt4EJWbkKFZFjA== X-UI-Out-Filterresults: notjunk:1; V01:K0:tL3UqNm2zN4=:z1Fa6IzaXdOrgojjAaKbTD Skk/ZfQl1BxqCPv1C2j1jjESSgwXpIpA2GZmLjHatmey+oP3+6+8DOdT4MTVMssqANC6dlAnK NRlTSwhLgchf7UQK7dq+5y/pg4uSsxUj1Et6mvbYQ0GBo3Fg+J/xECU4QSjBkHPUpfU5Sgmyj 9HMrb8gR2lH7LFggSreRMBowRU5NtrBlNIR4DlZtLpKpvY8oMpsPgYadvmzdXSRBSuX2rxApx t3CP3eim0MuGjMDgL2FTdOTqfT288fVBthkBhfBZvitWRH8Sp8ywSwvcS6UIGOT4qk86VW5lu oUTFRIuz6zFfytnlSE/sVqvuAz6coltNSMVDm4bKg87I6bwYdOaRAwm3HaoP/8+6XfNgtMnCu ajCrMZ562YA7XihxM0//3FSPIlBT2YicUfF4gJhIuuZiZS7XuXthBeYeaniMRIovBss2Bb+A3 kfejZAjYLlEM5HVPIcGKAcLRwZ2JhEdwQHyXUmTvKS5igfkbq978IR3pA9IZbypICbu/SaUzd Rf/4J+WPjnMyU4CwDOnVu7H4m5A1cHl9+UPFiQldbSqDsiyxlPnGQM7JO4flqBpVSU9CIdbIe BfYlOJeVPjhv7rKdsqz4R920l8K+t9NHjtJDswGpkPH0YPArhES5GD9WsixvF4U0boCvuFGds Elihw2LEQdC7nktSVU7Kex0kmDqgFhSwUjxB1N6h1tz6d88Y4F57Don6r90+vev6zJflEUuCt 5Dj+lRa6V2dfLBnFu1MGlhxE+8Kdb260ZXmFrA== Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org netxen_collect_minidump() evidently just wants to get a monotonic timestamp. Using jiffies_to_timespec(jiffies, &ts) is not appropriate here, since it will overflow after 2^32 jiffies, which may be as short as 49 days of uptime. ktime_get_seconds() is the correct interface here. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.9.0 diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c index 0a66389c06c2..1cd39c9a0345 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c @@ -2502,12 +2502,10 @@ netxen_collect_minidump(struct netxen_adapter *adapter) { int ret = 0; struct netxen_minidump_template_hdr *hdr; - struct timespec val; hdr = (struct netxen_minidump_template_hdr *) adapter->mdump.md_template; hdr->driver_capture_mask = adapter->mdump.md_capture_mask; - jiffies_to_timespec(jiffies, &val); - hdr->driver_timestamp = (u32) val.tv_sec; + hdr->driver_timestamp = ktime_get_seconds(); hdr->driver_info_word2 = adapter->fw_version; hdr->driver_info_word3 = NXRD32(adapter, CRB_DRIVER_VERSION); ret = netxen_parse_md_template(adapter);