Received: by 10.223.185.116 with SMTP id b49csp2394647wrg; Mon, 12 Feb 2018 08:53:18 -0800 (PST) X-Google-Smtp-Source: AH8x226mcoBRGDOhLxrf3NkfWc9J8JUEGdAGXQmt+gvJnNdsw+r1OHEl2t7Bm51FrKQkuUU0jdsh X-Received: by 10.99.125.74 with SMTP id m10mr10024918pgn.354.1518454398658; Mon, 12 Feb 2018 08:53:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518454398; cv=none; d=google.com; s=arc-20160816; b=d9RSuYWtaV9lnCh+hb5MHyHF+PsOV2t8B9KH3TCu1TWeuKSK/T3OoQk15pkx85q617 LKEwNiXN6KumRFWL2KPvFDi2l++bNvAaf1YAqriFMcN1lTUVXFKB3cn5aq/+f2WrVI+8 1d0BZRn5oE6kG771j9OqbheU9VxCPLEPbeqUiyNT8PWeFojaMJlS8aNVSRk068a8br2z /hscx+2hO9cwo2W94vs8+jW0OgmDrHSghQzl8OdxKRKu36FNS8q/A08D4XVbDiQIWSDI M8xYLvrE4My43pxrlb7A0t0BMkEbborO55Rry+gsY5ACkxQfPE3x+alPYYGnlRQ0jLPU Z9Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=3XZLfEtObr8WUc2BaWbyrxIAVlLeWUJdjO6bVvGVRqg=; b=UND9SEkHsJjux+u/F/xZPtcn9TDIUDQ+/dgQloX18iih6A48d+xuQUcnWLmlRmzwgl cOyJvV+Ob2SCpfl9fePRhmQ31QBRWgarZxxZ+GRAfFv08L//Iqb9NTo8YV9sV3qx9jgb BOis92vliHtTLnipVL4E9Y9IvvcNknZUil1VPDUEy6wK6AQttyq6yL7LUEBukhEU4e6e J2ZFukolVaYrU8sR1a3qaJahZWLlsoZbnrBuDomSakkkTbGYd3RGRVYkWgndVAfbVxQM 5i/vpGIU/g9xQXeEfz8Zg0iN0gtiJFQOAMSOcFROsbYBlMLgyY+gEQ2Ie7mFLHnBSxrn fPqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q9gH8jQT; 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 y204si1296400pfb.56.2018.02.12.08.53.04; Mon, 12 Feb 2018 08:53:18 -0800 (PST) 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=q9gH8jQT; 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 S934237AbeBLN00 (ORCPT + 99 others); Mon, 12 Feb 2018 08:26:26 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:45184 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933917AbeBLN0Z (ORCPT ); Mon, 12 Feb 2018 08:26:25 -0500 Received: by mail-qk0-f196.google.com with SMTP id x127so18306846qkb.12 for ; Mon, 12 Feb 2018 05:26:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3XZLfEtObr8WUc2BaWbyrxIAVlLeWUJdjO6bVvGVRqg=; b=q9gH8jQTl0CTtTzPghrPRCjrb1Cpx2KXn2+NIUawXDt1Ydh4YKE9uS04PgPA41/GGK 380ciHRbdxE6fJYzO/phuynFOb5TZpTX2iffy00/RgMxe5aCerKan0Te5VJK7aYWRfak t7Glcja5KUjypBoTYrqniJlDjkTGV0oW6+OjfLJQrMMyE+h7jpBy8gJ3IES7fVcSqRU5 oU8+lg2lSGQ2FqifuL5PreYvfWbUSC6nM2WV6cRZflJy2VN2HHaPpLwzgNnTbE92J71O ZoQrfGMHTSs/dPRjttIgkdoPPYHZlngLoukyNZXYvzpkn54ukf1vv5SDci3Yotk0njAa DWzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3XZLfEtObr8WUc2BaWbyrxIAVlLeWUJdjO6bVvGVRqg=; b=foJVxxwbDRC5FR+SlnwFcgqrvbzRZYocdRCxWRGeOjt7z0Cn0OngPxPjpaXWqGg6J7 d34goASu3btQYZeJAYXjXzR4xAiHLXCc583jaS3JRdjJ6QMK3rzXThnqf3/f1LTUEz1v RBkaUdjCHN6rG5VgojwY4LePHgQbutO2v6/J0NMgQUuzBKGtHs2NY4/JKfeJmztg7nEA DlIP0pJKawqNTI1e4H+LQZQk81f/N8MSVArYligqbquaamlWcBSmLh3WNWkNTRtTZqBx HIuoZpUlBEl5eq6Q3r/PvuD8ElYLIPzZtcxusjeW18A0I3sw+wq3IwLtgJQ4TzZXJr5m VqIw== X-Gm-Message-State: APf1xPBE0j72J3M1IDlyqp68rYhtNJEGYa6bRpXoY18osxv5vFn3aCLK tLMdaYEJYkQQfZMgmIljI8kl80ZJ6lxmIOc9k9U= X-Received: by 10.55.131.198 with SMTP id f189mr17649992qkd.250.1518441984375; Mon, 12 Feb 2018 05:26:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.52.247 with HTTP; Mon, 12 Feb 2018 05:26:23 -0800 (PST) In-Reply-To: <20180129065053.GC20230@1wt.eu> References: <1516979955-7466-1-git-send-email-baijiaju1990@gmail.com> <20180129065053.GC20230@1wt.eu> From: Miguel Ojeda Date: Mon, 12 Feb 2018 14:26:23 +0100 Message-ID: Subject: Re: [PATCH] auxdisplay: charlcd: delete mdelay in long_sleep To: Willy Tarreau Cc: Jia-Ju Bai , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 29, 2018 at 7:50 AM, Willy Tarreau wrote: > Hi, > > On Fri, Jan 26, 2018 at 11:19:15PM +0800, Jia-Ju Bai wrote: >> The function long_sleep() calls mdelay() when in an interrupt handler. >> But only charlcd_clear_display() and charlcd_init_display calls >> long_sleep(), and my tool finds that the two functions >> are never called in an interrupt handler. >> Thus mdelay() and in_interrupt() are not necessary. >> >> This is found by a static analysis tool named DCNS written by myself. > > Looks good. This code is extremely old (started in 2.2) so I'm not > surprised at all that after many changes such parts are not used > anymore. By the way, maybe msleep_interruptible() should be used instead? (since I guess you want a minimum time here, no?). It would also take care of the jiffies to ms conversion, so the whole long_jump could be removed. > > Acked-by: Willy Tarreau > > Willy