From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752430AbbFGHOA (ORCPT ); Sun, 7 Jun 2015 03:14:00 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:39386 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751019AbbFGHNw (ORCPT ); Sun, 7 Jun 2015 03:13:52 -0400 Date: Sun, 07 Jun 2015 00:13:51 -0700 (PDT) Message-Id: <20150607.001351.1615444562432115091.davem@davemloft.net> To: hofrat@osadl.org Cc: romieu@fr.zoreil.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions From: David Miller In-Reply-To: <1433580066-1237-1-git-send-email-hofrat@osadl.org> References: <1433580066-1237-1-git-send-email-hofrat@osadl.org> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 07 Jun 2015 00:13:52 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Mc Guire Date: Sat, 6 Jun 2015 10:41:06 +0200 > API compliance scanning with coccinelle flagged: > ./drivers/net/wan/dscc4.c:1036:1-33: > WARNING: timeout (10) seems HZ dependent > ./drivers/net/wan/dscc4.c:554:2-34: > WARNING: timeout (10) seems HZ dependent > ./drivers/net/wan/dscc4.c:599:2-34: > WARNING: timeout (10) seems HZ dependent > > Numeric constants passed to schedule_timeout_*() make the effective > timeout HZ dependent which does not seem to be the intent here. > Fixed up by converting the constant to jiffies with msecs_to_jiffies() > > Signed-off-by: Nicholas Mc Guire Whoever wrote these things probably wanted whatever this amounts to when HZ=100, so that is the only valid transformation you can make to fix this up here. Otherwise you seriously risk breaking the driver.