From patchwork Thu Oct 20 11:42:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliav Farber X-Patchwork-Id: 13013278 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C92E6C433FE for ; Thu, 20 Oct 2022 11:42:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231400AbiJTLmP (ORCPT ); Thu, 20 Oct 2022 07:42:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbiJTLmO (ORCPT ); Thu, 20 Oct 2022 07:42:14 -0400 Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7CC41DDDC7; Thu, 20 Oct 2022 04:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1666266133; x=1697802133; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2hlgTccoFkFoWBMR73SLtJ14tsBB/9sAvZeBjcUcGqI=; b=BTA/QkVMIzJUtLwhQ0LYre/rWsHcpckXeKEs9c2VRrMqTTvWVXz17sIR s2BJ4iH1eFJAv3bhiS7JX19bB+AYyBZ7ZrXxC4TGxsoS2xQ1K0XCNucAv bKYqLGNdk8cCr6SpQszOuP4JKNhUiM+Xrw/F/cXcfR7DNgvYTImVtAIao A=; X-IronPort-AV: E=Sophos;i="5.95,198,1661817600"; d="scan'208";a="257667255" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2c-m6i4x-fad5e78e.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 11:42:08 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2c-m6i4x-fad5e78e.us-west-2.amazon.com (Postfix) with ESMTPS id BF524A0F7E; Thu, 20 Oct 2022 11:42:06 +0000 (UTC) Received: from EX19D013UWB004.ant.amazon.com (10.13.138.62) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 20 Oct 2022 11:42:04 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX19D013UWB004.ant.amazon.com (10.13.138.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1118.15; Thu, 20 Oct 2022 11:42:04 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Thu, 20 Oct 2022 11:42:04 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id BC8184BB3; Thu, 20 Oct 2022 11:42:03 +0000 (UTC) From: Eliav Farber To: , , , , , , CC: , , , , , , , , Subject: [PATCH] edac: fix period calculation in edac_device_reset_delay_period() Date: Thu, 20 Oct 2022 11:42:03 +0000 Message-ID: <20221020114203.10985-1-farbere@amazon.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org Fix period calculation in case user sets a value of 1000. The input of round_jiffies_relative() should be in jiffies and not in milli-seconds. Signed-off-by: Eliav Farber --- drivers/edac/edac_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index 19522c568aa5..88942a6edc2c 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -399,7 +399,7 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev, unsigned long jiffs = msecs_to_jiffies(value); if (value == 1000) - jiffs = round_jiffies_relative(value); + jiffs = round_jiffies_relative(jiffs); edac_dev->poll_msec = value; edac_dev->delay = jiffs;