Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp300908imm; Thu, 26 Jul 2018 19:35:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcCgXxTnanoaHXWYgAHLpJb1+5Oee6oRtExdKBqHvhmIfDsVkRANSX4YaYiCJnqNfv5HV5F X-Received: by 2002:a62:4f5b:: with SMTP id d88-v6mr4634286pfb.225.1532658901691; Thu, 26 Jul 2018 19:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532658901; cv=none; d=google.com; s=arc-20160816; b=L7lw/fdyZ2+gzrGp4AHc3hPEd9OlGk1y4AFoFeAOYF4bz2CK8ojtI4XyRYmewHSuk3 J0H6YeRENy1JQaDUKnM6W0yDtjFNorUc6C/7h/p3PVuSoWegSKwyZO8TmpMel28ftxSo WLp+pSDB+8MTlbEuIIpnSxmflT+1NIIQ/xmsnBwvjxiyVeA9KnxuFIJwirk4NbljldEU gp5MhSKPihMEI7GcIZhUzqZYZzex66y3SCMxsEl9wl7xRkoBpwePfT3aV/STIA6vc+e/ JxQyKKTVRfA/jt+mp8HJIvsBiEuFxmTbyP/4hC2DPSOKWoZ5qfvbkfjk5y8XVmgeZoQ1 5zSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=hw5ZqMfoQIrkB/wTxn21h/0+whhSGPLmeaphm84CJ0M=; b=1KGZbuGS04JpPLVH4gTMpJpFGI0BMCKVpen4Ml7+fuV+xlzoJVbUTYV06C1hJe6acz 9XdtCvD+59yVoIzpO4smrOHJJIHFKuJt855fmYkCTB09Abnn3Sg/YwPc3E3mmIn4wVf2 188cncE1j8F/eC7eFBheaaXGRQRXqNT2Xdxg+D2XDK+Rp8TTtdH0JscnTCQ7hnOW+IUI sZvRlvx2y/X86msUFNuPnLQvnhETMyE1GbY8+rMrsqLc9OVVBhoCbWWJYEGBUOYWzBkD xL+2ZkK7aTkiPk6wB1+HJ3TEYaCabhkqjRZRUw+od8k78VNfjeMy/ex6kqgDBcg54wcy iZTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xz12QzVE; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s65-v6si2564064pgb.486.2018.07.26.19.34.23; Thu, 26 Jul 2018 19:35:01 -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=@gmail.com header.s=20161025 header.b=Xz12QzVE; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732094AbeG0DwB (ORCPT + 99 others); Thu, 26 Jul 2018 23:52:01 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:35045 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731587AbeG0DwA (ORCPT ); Thu, 26 Jul 2018 23:52:00 -0400 Received: by mail-pf1-f193.google.com with SMTP id q7-v6so1209222pff.2; Thu, 26 Jul 2018 19:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hw5ZqMfoQIrkB/wTxn21h/0+whhSGPLmeaphm84CJ0M=; b=Xz12QzVEr1EqymWFiIijq/uaSBKYhbqZ/0Zbeo9+YJqE9HslYUGQmAvOMquRorD+LY JYsvoA1F/40wXCQXrXkhEd36Azz0rGgS2OKFZj4jN94ZjDDkUsBKotkNLhJ6alyEFPOx LjxoVDp9R85IoaLcTUY218jGixo8qfB+xWkaqt/xYTgdR5uR9ohEIUMNnCyV5eGejYw3 zKEpougjj1YMYUm1GNHI/BdsDriDUf+QcyrJw2eYAdeg9OcStqtYLAnQD+o393shpXxJ 3QxukU64rEtvGV/PBE7q2gswSZmx5RPrsEyWgeFXrbUj6t2fWYs0Pm05VZb2r1MaCyii pZkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hw5ZqMfoQIrkB/wTxn21h/0+whhSGPLmeaphm84CJ0M=; b=R0cGSe+757jDVf+xeh7EOJENy8XGQyPDab/DlA7b2H8SMLCHr0hYdwObwAF2TFEJkX QXbinLauLj1OzhqpE0DAx2g0dha+1jd5VkNp6ugyc44ITha9m5p5nUNaxsIxVTXJqaIB XhoiMCXK1IPAhYhedGWbpM5DXccR4QP4XhTDlNMbnudMA3E9rSpx7Vw4gV1PNF6A0uAf AdJkJLh+7vuyNc1YVfgZc4kgjBJ/Dy96L02cyoFzWimoCr5adjfIrxfAImuR4EwyrjY6 a2CYgePPpqvba2cQ1ShVkQ8ItsIs9j0Z/0nx+2wMhX5t2VenNUbhEPADigeh2wTNnsLC e0kQ== X-Gm-Message-State: AOUpUlF4gDux5xTwtpJFr3M3fZhdYyc7uUzpbnOWuEv7JOjLXJ+M2qq1 g3N9UTFBlM9KTotjmvs8nwbEbINk X-Received: by 2002:a63:b40e:: with SMTP id s14-v6mr4262672pgf.9.1532658745023; Thu, 26 Jul 2018 19:32:25 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:6c14:7712:e625:1be4]) by smtp.gmail.com with ESMTPSA id q28-v6sm4475300pfg.144.2018.07.26.19.32.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 19:32:24 -0700 (PDT) From: Jia-Ju Bai To: dmitry.torokhov@gmail.com, rydberg@bitmath.org, gregkh@linuxfoundation.org, andi@etezian.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] input: touchscreen: wdt87xx_i2c: Replace mdelay() with msleep() in wdt87xx_resume() Date: Fri, 27 Jul 2018 10:32:16 +0800 Message-Id: <20180727023216.1467-1-baijiaju1990@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wdt87xx_resume() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai --- drivers/input/touchscreen/wdt87xx_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c index 20f7f3902757..166edeb77776 100644 --- a/drivers/input/touchscreen/wdt87xx_i2c.c +++ b/drivers/input/touchscreen/wdt87xx_i2c.c @@ -1142,7 +1142,7 @@ static int __maybe_unused wdt87xx_resume(struct device *dev) * The chip may have been reset while system is resuming, * give it some time to settle. */ - mdelay(100); + msleep(100); error = wdt87xx_send_command(client, VND_CMD_START, 0); if (error) -- 2.17.0