Received: by 10.192.165.148 with SMTP id m20csp396255imm; Thu, 3 May 2018 23:09:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpimBrCHzC32xa7bZ63HcxzBpCmiXzoVyjI9aX2hcuVIHV9rAsqO4PYrKEceC1UrjoDQ0Ip X-Received: by 2002:a17:902:a5c7:: with SMTP id t7-v6mr18508523plq.360.1525414179698; Thu, 03 May 2018 23:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525414179; cv=none; d=google.com; s=arc-20160816; b=qFH35Lru9SmJ5zpOcCXx3zp7PAo/SggnQcPspLKu8DphSA9plV6kURVpgTDKWxJvG+ RlgEEphqz/T1Spwxa8IbM9tfzguaD+b9KgKZRG+mYXPLRgm0I2RsYQ9uNfZLUkChehyr HDAmCXFSXQcWvRm81HXgR3FMU5KkAvUQAxkvooDfOIJpzyltAQ/EvmlUqe9sg8svmitZ AWQdhrRm6rDd5vUpjZ1Nkcj+Dz4HkKDCFCRBhvceLKegvomJMkU/RP+/1P1X26GpouSS PC7zlWg0Iewddb3K/DYbnZmQPxvJ3HgyG4w0LOXZrtSOVFHN2G0uisTDszOEREkvvspl BEzQ== 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:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=ytaui6CRjbCa0hnIsBO3oPbp1VdXAl+VAAXUW48hIHo=; b=Ld1v8MTg32Q9sw98LQaMYGMNtDrBBl3XEIqGZ31Ki7+tufmHdsllg55KFd3W0YkLy5 Hfne4JSh1eYPFqBX+zCC5KN/zj1eadz7jJMXodBTg9y45ZyS8nLBTO+j9x1SdDSlZx30 NWXKSy/0i4K+XnZ6Yddkn/y3fGTnJ8AO1gYgolFUf/QOas3ZFv5u2JCTtDxRVatPYn41 Nv7bZ5wKSKF/O4f/fWezy6ryh3G0L/hpd/IOvEMb9kKY/8l/5c947YHgrcapUL+juz32 U+apIJ9A7yErr3UUvhr21RYMfIdWvBfFC7p96XUZVY1RF3KUXduWJ3yG73lDAbEw0dwO vjJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Qdy4jm3S; dkim=pass header.i=@codeaurora.org header.s=default header.b=oB6WynWf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si15202588pld.65.2018.05.03.23.09.25; Thu, 03 May 2018 23:09:39 -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=@codeaurora.org header.s=default header.b=Qdy4jm3S; dkim=pass header.i=@codeaurora.org header.s=default header.b=oB6WynWf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbeEDGI4 (ORCPT + 99 others); Fri, 4 May 2018 02:08:56 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:45364 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002AbeEDGIz (ORCPT ); Fri, 4 May 2018 02:08:55 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9F5EE607E4; Fri, 4 May 2018 06:08:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525414134; bh=1et0j0qu9J6PK4eHAN72grP7Y3RrfFQPEMgFWp6UoyA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Qdy4jm3SYKWw5U5Lk6q0+PyF1KfdMNytyQudJfGgvGwCdzCauOv04cNnxptsnA9OC BJ1x9oQfwIAKZ1J6WarKwtQpcblxEODOJITvRRr62zHQ+mEeGiqwQkOj4kHWOk9aEu U+RZgLva2U9xAcJiOX/q4RxlrIa31TbRvhH9ZkhE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.50] (unknown [182.71.117.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5FC2D607E4; Fri, 4 May 2018 06:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525414133; bh=1et0j0qu9J6PK4eHAN72grP7Y3RrfFQPEMgFWp6UoyA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=oB6WynWfmOuaPKLuHQq3/3tz9gcLmz8+cLV7uP4JnmrVAI1a/rTa3EEWvtDgAruXI MxPRSWHhkcnLWGbfbnXI+Y/SqzX0i8a/lScsrwYg+nWsPWIebZuh+qAOyS6iT9zSnY huEfgNkIFrv87iYuEntsXB7HHpXVXf00dh4FancE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5FC2D607E4 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH] gpu: drm: bridge: adv7511: Replace mdelay with usleep_range in adv7511_probe To: Laurent Pinchart , Jia-Ju Bai Cc: a.hajda@samsung.com, airlied@linux.ie, daniel.vetter@ffwll.ch, bhumirks@gmail.com, narmstrong@baylibre.com, inki.dae@samsung.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <1523435622-4329-1-git-send-email-baijiaju1990@gmail.com> <5009396.5p49gfLLAe@avalon> From: Archit Taneja Message-ID: <4cc08136-b05f-89d9-6e6f-dcd12ebc86d3@codeaurora.org> Date: Fri, 4 May 2018 11:38:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <5009396.5p49gfLLAe@avalon> 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 On Friday 27 April 2018 03:46 AM, Laurent Pinchart wrote: > Hi Jia-Ju, > > Thank you for the patch. > > On Wednesday, 11 April 2018 11:33:42 EEST Jia-Ju Bai wrote: >> adv7511_probe() is never called in atomic context. >> This function is only set as ".probe" in struct i2c_driver. >> >> Despite never getting called from atomic context, adv7511_probe() >> calls mdelay() to busily wait. >> This is not necessary and can be replaced with usleep_range() to >> avoid busy waiting. >> >> This is found by a static analysis tool named DCNS written by myself. >> And I also manually check it. > > Nice work ! Is the tool open-source ? > >> Signed-off-by: Jia-Ju Bai >> --- >> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c >> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index b2431ae..2cf7fa1 >> 100644 >> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c >> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c >> @@ -1054,7 +1054,7 @@ static int adv7511_probe(struct i2c_client *i2c, const >> struct i2c_device_id *id) } >> >> if (adv7511->gpio_pd) { >> - mdelay(5); >> + usleep_range(5000, 6000); >> gpiod_set_value_cansleep(adv7511->gpio_pd, 0); >> } > > The patch looks good to me. > > Reviewed-by: Laurent Pinchart queued to drm-misc-next Thanks, Archit