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: "Farber, Eliav" X-Patchwork-Id: 6168 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp62055wrr; Thu, 20 Oct 2022 04:55:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5uCE4uCZ2RL4rwI7HEUa6p+qK17Yz0PuYJ15ZhobMn1uA3Srw7wc1ht8sCQFWSo3IG1cQB X-Received: by 2002:a17:902:e890:b0:185:4ac7:9757 with SMTP id w16-20020a170902e89000b001854ac79757mr13512117plg.150.1666266924769; Thu, 20 Oct 2022 04:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666266924; cv=none; d=google.com; s=arc-20160816; b=D7JQ+gZZQemQ2dFKqBgEW88BhUsZhQV9n0nKwDoqJxqS3WElxbX+V5MCYAgh55vMBy cFwvDWY9gtuRMi/yBuUnstxcNoTblxkFu5yCH6xeuEM5q6MvyV7bLNLvLylw+Fi2EUK1 /9YcFmJw1rEtN/XlrwrBHBVQPrhe/dAgfuurC3W0iR4ghR/JD3L+KT/X2wk1iOh58JWi VlDZgFWMh/H8EkiWmXis2fGB320ODK6j7gqnf0QWS7K+71LcWqcj+4LH0m2pfI30lEI9 3fDQxVN+3kanhnjnSgaeM4WzZfQ91t2naL0RqjM8zxPwl8mIZPxUmdGwLlJ1pxKjp0cN 8FGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2hlgTccoFkFoWBMR73SLtJ14tsBB/9sAvZeBjcUcGqI=; b=QkrdEHz6SRv1lD9ZU/WxtQnO5EZEYRef93v9SEZRHmAnD7i9VOq9lkj/IIx+Y7AVzI rYK7AMMyWQRee4YMMNpCP2qKj3IWcrGbd69BAgPTNViMHO+bi31egkfY+6qrAxVMJ8FR yOIH5zbWBi4NA0cuNiOH3B2el3XA8fi/+O2ifms2WIdPXWUxnojJzra47lUtOBJpwQ8b jz9TXb91EqbNTTaI0H7fUseIhD7yZx/N3SgcT/UPdS+C15H5rIj1og1yHRJw5FYGAjjV x24nNafDDmkOd3bHA5O+F1GLY9mKK3lX9pcX2cid/48J3luDPxhOHYI6VA94zYCD0sro ESWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="BTA/QkVM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l186-20020a6388c3000000b0041bd0985ea9si20431073pgd.671.2022.10.20.04.55.11; Thu, 20 Oct 2022 04:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="BTA/QkVM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231428AbiJTLmQ (ORCPT + 99 others); Thu, 20 Oct 2022 07:42:16 -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 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747207506779463568?= X-GMAIL-MSGID: =?utf-8?q?1747207506779463568?= 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;