Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3987512imm; Mon, 30 Jul 2018 06:55:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcsb9UR44BlfjE2xhua3i9/tu66WLZuR4hBDqmtd6bEn/2O1enAY0LqK2xJAu3cawnIkAYj X-Received: by 2002:a65:5bc4:: with SMTP id o4-v6mr16366716pgr.448.1532958909303; Mon, 30 Jul 2018 06:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532958909; cv=none; d=google.com; s=arc-20160816; b=0hEbbJBrx68xgpeFWzRqEimX2KEP8bkR/HlU3YQaaRrrSUhovZC+VFttcTbUc6b8Ac 1ZyrkkXye6Kvr3FCUgIyRkRrN6mRSEe7ArlWvPEOQKYuDOHNOIo1isEJv2JYB+1Jy0nK zufoahe9hm+FKEpGupkBQa+ZpUDTPNQqX2+Ny9yE/2oQzf3i4U+1gFJU8HalEQuhA+4M FukjLme/AywFFYoj+bneXbtaz7+3Z8sJcV1hrFpdx8MgeeVXGbit1D0Ps5zOgTHFJQan qAAfxxY3nROUt9HBRL47gnYJdlvdQ2OJJYcE7biWZtMdteQMSTUirtb7cDNFSxw7HS07 z+mg== 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=eXo+fRHT04dd8A4LBYXDXuvaLubri1WNPrXqAmSjUeQ=; b=VWwlgblN0xeSUPwJ76eDeJkx2rfbzYcK9ocs7IKDVgpvLhPUSmJIsx4kEO6O15uUue cuGiu84/b3PrmPePEgwbbDowOJuP1mT7+5CGhPK9BEMeia+gk91jlEk4ik4v46ZjRTT6 SP2jtC0Vzc88PX+bcN4wzz7i/OFBCXjmlnGeTHezHN5Wtirv0mcwCoTkL7+i1l6X8T5T G+/s4fhdPjH/bRma1l6nf2iM33iQQHaK46z0SHZTl+l27N7Jd2XRtb4pbA6UZScPaLDt Wed33NOLNChexn6uWDKeio50kRs1OMmW4LxMVfdNIMHndYUOqu94LU1Xr64DC6xIWenO mPJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DzMwIT0f; 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 q13-v6si9764609pll.72.2018.07.30.06.54.55; Mon, 30 Jul 2018 06:55:09 -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=DzMwIT0f; 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 S1729224AbeG3P21 (ORCPT + 99 others); Mon, 30 Jul 2018 11:28:27 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:44691 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbeG3P21 (ORCPT ); Mon, 30 Jul 2018 11:28:27 -0400 Received: by mail-pl0-f65.google.com with SMTP id m16-v6so5584339pls.11; Mon, 30 Jul 2018 06:53:21 -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=eXo+fRHT04dd8A4LBYXDXuvaLubri1WNPrXqAmSjUeQ=; b=DzMwIT0f3hLvpBLdsTcLT5u/T20aTWfmeBUUBu3ujCnBSumKseVXzEc+pZ2KMayKGi +CFzt2I7gFPv4342Zj5iVo6svtMbN6FKFHVMWt6dRpGAGBLWvai82bM/9WF6LK3TovIP kI+ldVMkEdYvhKjyLfuy8a7QjPQQ/eA2TId72iQ7Wf9bj5Y0d0cwtV3uloZ+r5R0zVfh e/y2zNEg41Zuu3fXWwQ9Gh+gf/S/kFxvziT+x8NhR9v0D1wXVCFYAOFtnloQtTaKGAvO caCBbOfEmhiy29fN0dZf4IQep5VL0osavYma6yhqEUg0Lpg7WC2omiW3y+YzCTKwMjwR 4UWQ== 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=eXo+fRHT04dd8A4LBYXDXuvaLubri1WNPrXqAmSjUeQ=; b=T2Jn1fA7ZOOqujg8LynRSNgvXKKDWMq5xk9mHjiqnkYobQxe6mCppDZmwXstnWvTr1 6QpEgCwnHWGAQD8y+cD79kIMtbsGr8uPMGMyqS5A+dh4dRI3dgVlG7vEJ9qcHxD20hou QDp8xGrxIpmDI3N7HNQEa/HZyVTSOJJs2mI738nLdtMUqJPK7UuMLMNYVJ+a8Gq8QKgl qjVWNFARaLLVvHSGv7MZg8zBT8rqDWs64T595XzaNbn5DqH2YzpiWkUVN8zSj2R3GbbF FHaYj7qfD1blAze2ldrslfyFx7l7nznu7+NTUU2mLyj6+MQUyg1R0qHA6GtAjPvIplVr EOlQ== X-Gm-Message-State: AOUpUlF/WmBQ0YtZQB0MUQgJ+QvukSAk9j5P/PmqkOjFMoSTDwc5V6Jm 5LELCHyhQFbUKdtxpQqbmM0= X-Received: by 2002:a17:902:c6:: with SMTP id a64-v6mr5682628pla.180.1532958800868; Mon, 30 Jul 2018 06:53:20 -0700 (PDT) Received: from localhost.localdomain ([2402:f000:1:4414:4550:ab75:cee3:d6c1]) by smtp.gmail.com with ESMTPSA id p19-v6sm23264546pgh.60.2018.07.30.06.53.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jul 2018 06:53:20 -0700 (PDT) From: Jia-Ju Bai To: a.zummo@towertech.it, alexandre.belloni@bootlin.com Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] rtc: rtc-omap: Replace mdelay() with msleep() in omap_rtc_power_off() Date: Mon, 30 Jul 2018 21:53:14 +0800 Message-Id: <20180730135314.9336-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 omap_rtc_power_off() 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/rtc/rtc-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 39086398833e..ef3d09525d0f 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -476,7 +476,7 @@ static void omap_rtc_power_off(void) * power off the system. Add a 500 ms margin for external latencies * (e.g. debounce circuits). */ - mdelay(2500); + msleep(2500); } static const struct rtc_class_ops omap_rtc_ops = { -- 2.17.0