Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4059594imm; Mon, 18 Jun 2018 08:30:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKLWZk6XFqxH4YKW9i5z2hVXo92cpK/xmaTXRa+8TPKyyCVSZm67rgvSQzScvxXUMr/cdkY X-Received: by 2002:a17:902:683:: with SMTP id 3-v6mr14713404plh.291.1529335827878; Mon, 18 Jun 2018 08:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529335827; cv=none; d=google.com; s=arc-20160816; b=o2vtRwATDZkuQqTWqd9NjAt9+9XH5diwTspASAYEwucNzO7Eiqbrqw07wRh6XDFE1y qXbZUoRWC4zmVIry27ZtTGbYUcvX4VGMlIlnjipCruH2c1hEnPCQZGkYtd5tx9FaJrUr 3uOcun0wrs/7iJF9suLmMvy4ApMvu70lVAo8kvG6MwKMO0WDg4ztWNPrGvIIT5EKdUwF xwHkDmOmHPZ6qc2id0nzQbz8j3113PCyWx+ktMDUOkcoSdL/ZV6Dc5FOYoKLqRxnk3s5 Wxh1jzGKFK3vqt7H29E/2owxbk0Caak//AnZBnCkjttL9aesQ8y8ydx3XWJDKYEaJNuM +J/A== 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=g4NMbRk6o2gQ8ipuIx1txk9+r23bTUKr/ugK6pSz8zs=; b=0Q/WxujIzw7NGvLe5oY+y5smxtJzgqh3Gl2DtsQSCC8lW8k2AEx06f8QpBIbitF1Zc TM/d0Is31mEPtyyey0MP5SMLyXyEABLgSsCJVenOfqFCI8P3hCLkQqQuFc/x9RlbiJpu teVFEBcr4GYD/sAeWd37q7I9eeeSROpX2nTQHnwkpnL1sPDGRKltUCQKGQGLPih5xIer u2L3LEnFI0UX7iGmar4rwOrPrg633dMi344rMca5hZTa3JbXkEc8beZcR7z5KLdC6lz5 XwU6Gx/hq1efWxeRs8N6ra4JVB6pvyC0DmFl7ZVyHXjPw345x3KopbwcG3HQPlapJCPB retA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 191-v6si12320651pgh.407.2018.06.18.08.30.14; Mon, 18 Jun 2018 08:30:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754652AbeFRP2x (ORCPT + 99 others); Mon, 18 Jun 2018 11:28:53 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:37383 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752849AbeFRP2w (ORCPT ); Mon, 18 Jun 2018 11:28:52 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lx0lJ-1gJ5pw0rLF-016d3G; Mon, 18 Jun 2018 17:27:37 +0200 From: Arnd Bergmann To: Adaptec OEM Raid Solutions , "James E.J. Bottomley" , "Martin K. Petersen" Cc: y2038@lists.linaro.org, Arnd Bergmann , "Guilherme G. Piccoli" , Raghava Aditya Renukunta , Dave Carroll , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] aacraid: stop using deprated get_seconds() Date: Mon, 18 Jun 2018 17:26:47 +0200 Message-Id: <20180618152734.1705907-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:syyDAalw4WAbMQ1EHmInd9Roltij1J07HEFM0xdLx85fWQapAcv E1snIRGUtlRI60COhzmvFOZ+iBJvadaf4VEs9FcZCO2/frcgsPGO3KAFcqntgmOLldhi2Gc nH45SdLp8Fw/OYXiO70kRUlnNXx8LRis57DdnteNfwBrYHA+00sXwu0m5T3jRCx2qU1fhz7 zgO03p4ONv9pYnYm2qphw== X-UI-Out-Filterresults: notjunk:1;V01:K0:cZF80Fh1NX8=:zlUkOcCNelIVkjHoWwdaEW DQP46HaCYFilqQAzTd5rKT2ASGHb2hW0vLeJdDQ6xVgAiM35bd5+K8fzaCDRUiE0dmuRY+LSQ nATyJzeMwKnUyAwelOgNFoWSNfHuJexEI3v13SE9jR2QcIkh2nCcdnWX17F1OT98rsoTU45KA wR20Mhzknqh6PDB0VM4VMk1UmI0E0NgITwzyDuNkeaaoGLiE8QG7kGEYjk6b8HylVBIwE2v3l jxRd9iHXUxOJa8y6o1v82760BVu7Xexczn0XHmb8bFv719eBMsQ/xIJL0bGZD6hYzKoWyZ1gM C6b/PNIvCr2iT4VeyjM9V8hGhHBWxUMeGoBmN514FWzjWiW20yD7j5FUeOUghsSIRTLdd567O 0vcKpyl28hy4dcpQXxvDLHidqEvBiml9z+gWEuPnCcoLO92CK6RN9Q+5Vkp0vb3vFfNCeXLtX FlFJs/QjrIs4dqoOSxrJl84hX4CVQl5uf7/6k1ml1VSe22yjzB+qPr1daDbhDn62AkIxQGpFF PGAoGL59XCQlBqpRwN1LzGeKdN1ftTtEOn1ZNVGj7C9izb0nIe3DAtH/takQ2UBIOuTjhVsaQ oQ8O5R00BoxIFkccTzjyCKjr+ub76lqVK6pVuIuPvbAUZUVAQ75sTdAavkt7BXTCvUNQ5ZPzM IfRRb+STrps0lOXexaAkIYfOerctXuqzOgU/CRfJqz+CG+o30Jtwq9usipl70WIOxjE8= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org get_seconds() can overflow on 32-bit architectures and is deprecated because of that. The use in the aacraid driver has the same problem due to a limited firmware interface, it also overflows in the year 2106. This changes all calls to get_seconds() to the non-deprecated ktime_get_real_seconds(), which unfortunately doesn't solve that problem but gets rid of one user of the deprecated interface. Signed-off-by: Arnd Bergmann --- drivers/scsi/aacraid/rx.c | 2 +- drivers/scsi/aacraid/sa.c | 2 +- drivers/scsi/aacraid/src.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 620166694171..576cdf9cc120 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c @@ -319,7 +319,7 @@ static void aac_rx_start_adapter(struct aac_dev *dev) union aac_init *init; init = dev->init; - init->r7.host_elapsed_seconds = cpu_to_le32(get_seconds()); + init->r7.host_elapsed_seconds = cpu_to_le32(ktime_get_real_seconds()); // We can only use a 32 bit address here rx_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL); diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index 882f40353b96..efa96c1c6aa3 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c @@ -251,7 +251,7 @@ static void aac_sa_start_adapter(struct aac_dev *dev) * Fill in the remaining pieces of the init. */ init = dev->init; - init->r7.host_elapsed_seconds = cpu_to_le32(get_seconds()); + init->r7.host_elapsed_seconds = cpu_to_le32(ktime_get_real_seconds()); /* We can only use a 32 bit address here */ sa_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa, 0, 0, 0, 0, 0, diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c index 4ebb35a29caa..5a299975a289 100644 --- a/drivers/scsi/aacraid/src.c +++ b/drivers/scsi/aacraid/src.c @@ -409,7 +409,7 @@ static void aac_src_start_adapter(struct aac_dev *dev) init = dev->init; if (dev->comm_interface == AAC_COMM_MESSAGE_TYPE3) { - init->r8.host_elapsed_seconds = cpu_to_le32(get_seconds()); + init->r8.host_elapsed_seconds = cpu_to_le32(ktime_get_real_seconds()); src_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, lower_32_bits(dev->init_pa), upper_32_bits(dev->init_pa), @@ -417,7 +417,7 @@ static void aac_src_start_adapter(struct aac_dev *dev) (AAC_MAX_HRRQ - 1) * sizeof(struct _rrq), 0, 0, 0, NULL, NULL, NULL, NULL, NULL); } else { - init->r7.host_elapsed_seconds = cpu_to_le32(get_seconds()); + init->r7.host_elapsed_seconds = cpu_to_le32(ktime_get_real_seconds()); // We can only use a 32 bit address here src_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa, 0, 0, 0, 0, 0, -- 2.9.0