Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1127185imm; Fri, 27 Jul 2018 11:34:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfzH13/ZXkbGTNguOBWphkgplqJ4es0ttQ5pGMbPmGeVDf+EDtUw8aS+jiJDHr8DA+hpz1d X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr7222125pll.165.1532716441109; Fri, 27 Jul 2018 11:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532716441; cv=none; d=google.com; s=arc-20160816; b=SoVb6g2zl6jWeynF4B2SnISIKwUv6tFiGQndMe1shWoglnyfEluNghLAqXU+sIdD8o mMnxpZnjDWKWiBmvwH0iDMgO9ZVRO8iWL5mN2vybolysKeXpDhf882PpdjVTGL/3JzjZ 19ym5pk+xTojTkr7ccCWcl/N87Dva+BzRpun7CyiJn5aP9WY4G0rmPZFIy+yvlUfIeRO I6uSlRwAirrGuXV3mtEWf93nTv47bv3KSAj97yMyVuNLijeCo6jtKWvKUA2s1Kpdm+92 yeSHbzlMRhkXgrTKwhKUS3Ig8y5EbQWBxCAIc1VQQPox5QNKUlL2GbGfx4GJXSMN6t7i Ch6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=PLc9u440K7eobh8q4fBsLr8R5Di2X7fS6eZHvJgSEoM=; b=dovN2MOGKBc76qPbX5fh44pUxSa0LnzPTv4xwZ9ShBFLHaoyMiIrM9lGL8c/Q1RP+2 76Ow3+QoYr15TUa6Gwc21LhUdE7M1vcw9fdNQXj5yYG//CXAN10pg6BfPFgTFrGXG+6y dY686YIa+bqKrQUd9zr2Npa2TIDsyWxSIFTNvh0meN9ttYlrUW2KlHneI6US9bjGKVfi 7nNfTUkfFuLzKhO8ggZElish4OM0lzR0zWLhCbbssNibjIjARe7XIwaCkODgaB2O4Csv CSH0mm4C1nsJyxk344b7/dqkH/g28GcjWIzi+iZyq0Nmn9I0Sd7jKhNk9AultK7YY8uj 8ekQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dWhwBpiE; 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 a16-v6si4475678pga.168.2018.07.27.11.33.46; Fri, 27 Jul 2018 11:34: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=dWhwBpiE; 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 S2389049AbeG0Txu (ORCPT + 99 others); Fri, 27 Jul 2018 15:53:50 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41031 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388836AbeG0Txu (ORCPT ); Fri, 27 Jul 2018 15:53:50 -0400 Received: by mail-pf1-f196.google.com with SMTP id y10-v6so2007204pfn.8; Fri, 27 Jul 2018 11:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PLc9u440K7eobh8q4fBsLr8R5Di2X7fS6eZHvJgSEoM=; b=dWhwBpiE6UvwmG8njpByLfGiewV9ShLasUPZQVzCr2qyngbzXG1yD9aAgy0qfsDsLG ds8fc9BSZMildOIlV+ciDCoUf0rkxL8wyC4h1FK7WclsMXnjhJpg4KRSoHEAJDSzAXkD MFn9g0Wb0pqrDYAND2JX5SHlQJZ+Wl0EW6eIY1x9pmrWptprTnm1bHLj7H8GonsPaORf MRTDmPFLm8p2m7CPSOjEH0cesB8YEv3EZY2rnwhNYr/2JdL42FLpH+kt6LbaxFWVQSRh YwuN2+1S8XLzgh5HRQ+aZcPlc7D6PUcnRHf9h5JMazFq6HrZiXrU6ttjbX5m/7V3WTvd aYxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PLc9u440K7eobh8q4fBsLr8R5Di2X7fS6eZHvJgSEoM=; b=VXF99QxfdxWDmgk5HlPSl/1BrIA9QbqwzrKokWlrlr8wyTySS8H5JSNCJ1/fWuQmzJ kBMtl8riqRRNhHV1izvIhvPspQF3HkDvx98iGK6dwO1rq/9GMinbrJVDDbuOd4PDiJoJ MTWV9p5scWDqT3oJMQcGriz7+FJnwATf5KH5OO/hYuKmNPj6G8bNtFS7wU/DhI7kgua5 f9meFey5g4erUvt9kpEA+lrx1eLJAmILLjt5EbjXHsSxcVsPt4xdZqC8FFcZe+EeJk4g rg2HeL878G673PXoxshRHBPMkWVf/5JpCu9gHs6qiWsMH6nFOKCenkTjXESyPYebq1Se Z19Q== X-Gm-Message-State: AOUpUlGdbWt7vDQVp4tdXvUS1ADvCAsc9X6Bi4T+PUBPzmJductHt1+n eSpZSriGX56u4LwbHpWzF84= X-Received: by 2002:a63:524e:: with SMTP id s14-v6mr7211279pgl.35.1532716244642; Fri, 27 Jul 2018 11:30:44 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id g20-v6sm6802754pfo.94.2018.07.27.11.30.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Jul 2018 11:30:43 -0700 (PDT) Date: Fri, 27 Jul 2018 11:30:41 -0700 From: Dmitry Torokhov To: Jia-Ju Bai Cc: rydberg@bitmath.org, gregkh@linuxfoundation.org, andi@etezian.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] input: touchscreen: wdt87xx_i2c: Replace mdelay() with msleep() in wdt87xx_resume() Message-ID: <20180727183041.GA72640@dtor-ws> References: <20180727023216.1467-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180727023216.1467-1-baijiaju1990@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 27, 2018 at 10:32:16AM +0800, Jia-Ju Bai wrote: > 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 Applied, thank you. > --- > 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 > -- Dmitry