From patchwork Mon Jun 18 15:26:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 139007 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4086798lji; Mon, 18 Jun 2018 08:28:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKwlfl8Yg+toEvPJNpiW0zGVm3PaPfUjJ0MtEnHFbDAJScd25ooDhoBl+nLnqcdBb7FtOfX X-Received: by 2002:a65:634a:: with SMTP id p10-v6mr11437351pgv.184.1529335736304; Mon, 18 Jun 2018 08:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529335736; cv=none; d=google.com; s=arc-20160816; b=cwGfLCDfc6gYR2oSUkLBJU1nJweswnRKp2X4NdD6sMrzE+z7u7aqbINitVTp6Zpxju fMIdNQSpz2nkM2Chu2VdroPkkKl0+z04HCNELKtOL7XuV3etfz5DmldyMU2XYLVh7gKh /d7SLbXwTTq3EnZhQMby2o0ABtPoECaTXrXrrUG2WnTEeLA+mMolUTvAXLGaBLuylaU7 N4ZB1RszQPZA8icff9G807imE79aMYTEnqiBwLk8iNYniD6xSszuHEvmBFn6i3SUrF5I LLAZdbGTC0CBq4h3ZTrVYki+ErWQjujJtQSDqOxZJ1SUZSKEB8SDnUiXb2Gk+vPaVmbj sbTA== 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 p23-v6si15227288plr.384.2018.06.18.08.28.56; Mon, 18 Jun 2018 08:28:56 -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 S1754743AbeFRP2y (ORCPT + 30 others); Mon, 18 Jun 2018 11:28:54 -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(-) -- 2.9.0 Reviewed-by: Raghava Aditya Renukunta 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,