Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp822766ybg; Tue, 9 Jun 2020 13:51:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxclfBkzDNJqgIp5YFt/3MtEls9IpmqKyiS/6yss5dedSi3g/0snRDaV/S+roBZtYK35ihZ X-Received: by 2002:a17:906:1a06:: with SMTP id i6mr234689ejf.9.1591735906756; Tue, 09 Jun 2020 13:51:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591735906; cv=none; d=google.com; s=arc-20160816; b=Px+z80toRPmxcHMO1Y+ipQoSCjpXZTuMR+9mywbjWTWZcipylTBulNuITL3eWFVG15 yQzCn9uZ5VvnQnV5aOjblny6m3ZCRBPWG4Vq3VyhR3X8U20S3sEfoqCHU4/4+iuspfhv Y6JgWWRXeKDOdumvgh5XM5adhrrf4aJW7b974Ft3r1nkgYBqr/uPLrr9G49IVhofC/4D b3Y+3YCNddD6nUDhcKfagMbQdxaFVOrJIpVcOQsQ0YhsbClWwfGsElWBmr6LViJ33T0G m+uh4g+kKSpUsl6n+zrNuF2T/bumWwvXDTCOo8odRuYz6OCFKhb93UPa3Ng5m8zkRCCq AqqQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gz9jHrd19tMvfltELFNEZu5vfsrGH8nrJcXFS/mzO2E=; b=CkG95sHKEHqKM0C6A5H77z33eCm8RLFl655ETXj9N8exY9NQjzroDHs3D2be3q14tD f2GGAo93AB2ujZsBuHJd8HN1fkuvpNS2+5YpBMqaEFJuz+zziAuKi7TTFl7KbZ3Uroca MteFxGiBA070BpzRSpH/aAvxshG/zEWaD80jyLX+q7udNOR3j4QlSCS55BgqlviK5V8x 6t1ZXeOaOLmxnt07Ce0qKdeQuH9we4twGNh8nfA6Kd7KRBq/QBbET5tb1scU8yy4vEPH a0/tfN9X7Z2ZAp5llLN/jAzawtBVzHcwKaoPEH6zUcLdw3hkaKFTg7cP3rdKWWNqsxXP oXyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=cma5uxGU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du6si7394676ejc.189.2020.06.09.13.51.23; Tue, 09 Jun 2020 13:51:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=cma5uxGU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730839AbgFIPkn (ORCPT + 99 others); Tue, 9 Jun 2020 11:40:43 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:29017 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728162AbgFIPkl (ORCPT ); Tue, 9 Jun 2020 11:40:41 -0400 X-UUID: e7a9c9055d104c92b80cb848ccbde569-20200609 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=gz9jHrd19tMvfltELFNEZu5vfsrGH8nrJcXFS/mzO2E=; b=cma5uxGUd077/+2UxsRe+VmTuJtu1JMw9k9F9JvC13QIKHJffg3bQO0YjHioBxHmLoV2Bij9SjwQQBwiF6WZgjyMPnFviS3t95HLVS1SFKBqdmfKd+rAQxC8qezonM0yYdgCiF4rCzD6bcm3EnOayaE4PgfuYGMKDAG+pOJlYX4=; X-UUID: e7a9c9055d104c92b80cb848ccbde569-20200609 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1718300528; Tue, 09 Jun 2020 23:40:37 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 9 Jun 2020 23:40:34 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 9 Jun 2020 23:40:33 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , Stanley Chu Subject: [PATCH v2] scsi: ufs: Fix imprecise time in devfreq window Date: Tue, 9 Jun 2020 23:40:35 +0800 Message-ID: <20200609154035.1950-1-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org UHJvbWlzZSBwcmVjaXNpb24gb2YgZGV2ZnJlcSB3aW5kb3dzIGJ5DQoNCjEuIEFsaWduIHRpbWUg YmFzZSBvZiBib3RoIGRldmZyZXFfZGV2X3N0YXR1cy50b3RhbF90aW1lIGFuZA0KICAgZGV2ZnJl cV9kZXZfc3RhdHVzLmJ1c3lfdGltZSB0byBrdGltZS1iYXNlZCB0aW1lLg0KDQoyLiBBbGlnbiBi ZWxvdyB0aW1lbGluZXMsDQogICAtIFRoZSBiZWdpbm5pbmcgb2YgZGV2ZnJlcSB3aW5kb3cNCiAg IC0gVGhlIGJlZ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