Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2456817ybb; Sun, 12 Apr 2020 06:30:37 -0700 (PDT) X-Google-Smtp-Source: APiQypIhuPc3++FEP6OqiSDVeESvcE4/+3/KnhQ0gdhNLiRwynFthgu5pqk22T7aERiskf2VwOrO X-Received: by 2002:a0c:9e2f:: with SMTP id p47mr12243909qve.211.1586698236861; Sun, 12 Apr 2020 06:30:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586698236; cv=none; d=google.com; s=arc-20160816; b=0vE5q0MztsqenWHArWaDu2kiHkpTqN9yEUXJOhSzgQ9m60InT+P5LhZrpKZ3bC8vYg ICzbaKclBLfhhME7kAtOds4FKGwyTcn27nrlUb3Jfte+1gGOSe6BJSwWBiyWG4S80Z06 NbAx3q+/lhFliAH0OI5DgEVRozbWIcGsz9yeHCGyQh0qfCu/+0VAY7aQewFg3n1OWEPZ TBWqJ5R4SERMtBYYy8lVHR4KbOggFVfyCEe6X5TCqc2LNqdQEcda/3MYRmy2khsDOFg4 AskPMgBQ+HmfM8HLmbOy4ZZbeXEMVkh6SJ9ZvgWNQcCvBRdp/MjvrOjtEcNVmU6Kuq7K MSUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:subject:references:to:dkim-signature; bh=20Xym1g+2xCGcmJuCNInJKvW+oOdMSKnpImJLyKpihA=; b=xT03rcemcLpURYgELxWDUG6TkjhvX+zrn2hveHEPH4lTRMYWh3JgiEQiNlAa4wQNIY 1e7N7IwcRm9foGEDWKo7k6KbQhqGC+eYd9MSZzG/Kpf6zd6bWeQKpkEl0FBx49MTeVJO AThxWVy/jH9FNj8U+QY/yxz66mqt5oyA4fnoxl1r3WX7OFvLfpFCAmk/LKbixyJHmBtz 1KdsjPsTP5M+gK7AcF+qgkrbADg9sn2ljRCKphhjWiXVDudkjU0SzOliZ5aTUU/tWmtm 3k1CUn3WaFj0eLNjsNZCMY2RaxsbuzFU1lZt6VSdCtuMlx9qmk9EfP+Oz/Ng5/h7sjxI 2MpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=qPWBD9is; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 93si537554qtg.220.2020.04.12.06.30.21; Sun, 12 Apr 2020 06:30:36 -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; dkim=pass header.i=@yandex.ru header.s=mail header.b=qPWBD9is; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726934AbgDLN3f (ORCPT + 99 others); Sun, 12 Apr 2020 09:29:35 -0400 Received: from forward104o.mail.yandex.net ([37.140.190.179]:39408 "EHLO forward104o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbgDLN3f (ORCPT ); Sun, 12 Apr 2020 09:29:35 -0400 Received: from forward102q.mail.yandex.net (forward102q.mail.yandex.net [IPv6:2a02:6b8:c0e:1ba:0:640:516:4e7d]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 05B57940544; Sun, 12 Apr 2020 16:29:33 +0300 (MSK) Received: from mxback5q.mail.yandex.net (mxback5q.mail.yandex.net [IPv6:2a02:6b8:c0e:1ba:0:640:b716:ad89]) by forward102q.mail.yandex.net (Yandex) with ESMTP id 00A8E7F20013; Sun, 12 Apr 2020 16:29:33 +0300 (MSK) Received: from vla1-61ce7aa04735.qloud-c.yandex.net (vla1-61ce7aa04735.qloud-c.yandex.net [2a02:6b8:c0d:3e86:0:640:61ce:7aa0]) by mxback5q.mail.yandex.net (mxback/Yandex) with ESMTP id fn6LxomBys-TWlmAoTw; Sun, 12 Apr 2020 16:29:32 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1586698172; bh=20Xym1g+2xCGcmJuCNInJKvW+oOdMSKnpImJLyKpihA=; h=In-Reply-To:From:Subject:Date:References:To:Message-ID; b=qPWBD9isSUDiBc3MbyJ7Ck6D+eeRBuBxlRzKowgfjkouZwjd7402O6xPeWFuYGSRf WSWdf4g+OoAX9ozjgDWkJV5HB8EE8PGzSWlcttBrR7xS9qf34IeZ4Hm911iXoTdeio 6u+sM4rwoJD39xd+ge0ZGJCAAIbdc87/jX/bt2LU= Authentication-Results: mxback5q.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by vla1-61ce7aa04735.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id uGxk6FJkg5-TVXS9kgN; Sun, 12 Apr 2020 16:29:31 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) To: Nishka Dasgupta , Larry Finger , Greg Kroah-Hartman , Michael Straube , devel@driverdev.osuosl.org, "linux-kernel@vger.kernel.org" References: <20190712071746.2474-5-nishkadg.linux@gmail.com> Subject: Re: [PATCH 5/8] staging: rtl8188eu: Remove function rtw_modular64() From: Ivan Safonov Message-ID: <66fb1e37-107e-54f4-4986-ca4e4bb99d2d@yandex.ru> Date: Sun, 12 Apr 2020 16:34:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20190712071746.2474-5-nishkadg.linux@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Remove function rtw_modular64 as all it does is call do_div. This is wrong. Macro do_div(x, y) change first argument x, but rtw_modular64(x, y) preserve it. > + tsf = pmlmeext->TSFValue - do_div(pmlmeext->TSFValue, (pmlmeinfo->bcn_interval*1024)) - 1024; /* us */ rounddown(pmlmeext->TSFValue, pmlmeinfo->bcn_interval * 1024) - 1024 is a better replacement for > - tsf = pmlmeext->TSFValue - rtw_modular64(pmlmeext->TSFValue, (pmlmeinfo->bcn_interval*1024)) - 1024; /* us */ Patch '[PATCH 01/10] staging: rtl8723bs: Remove function rtw_modular64()' have same bug. Ivan Safonov.