Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp484021ybg; Fri, 18 Oct 2019 02:53:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdtUo3W+/DKkWVn0iRdvYQMp7PqRepN0+Fmp+uBdqn7vTgS2JGX9tifwJ/68qe0WPquN27 X-Received: by 2002:a17:906:68d5:: with SMTP id y21mr7777464ejr.272.1571392407997; Fri, 18 Oct 2019 02:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571392407; cv=none; d=google.com; s=arc-20160816; b=Y1hfP3ScSLXssGFuDLm5QfKw00pc27i89W/DrDS/lRZmeT2feZeiurIVwF62RKY6l4 Ogko2+XvldbX+U9IlkRgtSuAgthV7cidH6F/T7aTvTAh9QKYlRmnr3/091S1sMZOuprL aXsaC4A9wwUZBAtC4/i/Quqa0FHE2efx+F9b5KeG9Gpqc8RgJqUCHcmmTplP3fHb0vE5 tGEFyO0xgk83Nx64pUzGFS+rpaWs4DeTxzf+38jjtArFx/wr1E9annJgXpEp1IHp+7eX zkncetYB38g+GEv/e3y8TUGd9Uod/KWAoTXgzuiiSx4cuExK5jhiBJwosbr9EGbaCi93 O74Q== 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 :in-reply-to:references:mime-version; bh=lAM1QnlrpsM8TOCfZsHr08AYy86y8/SONo11Ddop3Cs=; b=ZpPKwZ2ML67w4jmOYFg1LnpcyXSCxSujDfBxfo5aSJ4jV2eWWSizPHCVYVmZppTTj1 F87W9Ka4eXBfcbg4tk9yL4D5idrfRdcY7n0R1KfHvvkjtMKb0U70A95N2ynVIXiYpOUY fYBSIj0NhGM6iWK9RpRxGViu5vTBOsFpaa+YWLgwvC6UvLcFouXK0pHVGdW2ur6Cs9rO wnQlCxKA1P5o+dcKCC0MPAuCw2zYK/h9qvLiqVqv9TqDZqySIaqlgpj1ywU41+/Ssn03 NWUw5duh5iGs5ZJZxKxpv/GCeqAPkOVaUOuLQ9P2c7BlEIbCPNrxGlNWD00ZQkLHkcIB ydxQ== ARC-Authentication-Results: i=1; mx.google.com; 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 e13si3103373ejc.387.2019.10.18.02.53.04; Fri, 18 Oct 2019 02:53:27 -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; 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 S2404883AbfJQG7i (ORCPT + 99 others); Thu, 17 Oct 2019 02:59:38 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:44512 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392672AbfJQG7i (ORCPT ); Thu, 17 Oct 2019 02:59:38 -0400 Received: by mail-oi1-f195.google.com with SMTP id w6so1217015oie.11; Wed, 16 Oct 2019 23:59:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lAM1QnlrpsM8TOCfZsHr08AYy86y8/SONo11Ddop3Cs=; b=b+FAQWEbTlLRU9rkE6MK+AnnO8lChnKASzG5hTShbua64pCKYitUUdUwt3Cmg2Fzel W8SYZCGE1qNsLfyt/LpxYcwaoBk1DFqT1++h0pw9Gn+CI0un7IFRQf60+p4pChvkfQGg 2lLPb83vTqbRmt0g2ENd+Xvtsnt6zdlvuQkFAtAxvQ6hZuKD4l/kwNfA+KkuZj6tlN9L 6QqNg9OgdyV1HruWECeCdIJQKxJrymOH3wbs98l3Un0zTYffDOOz0V2t0a0Ma7Esfai+ CL4tYlxlhNgTobQc0mhyufVLpS/cfIqWY9SQXw4XuylNDwruCYv202++Tyc0xBtvD6J9 Ft4A== X-Gm-Message-State: APjAAAVmbURUHw9vH/C54Q2Ang5hzV0Z/1abHNyoXd2eH6dPmm9mFVFE L3ojn1j9URlUG2wpV1tjeDYmKhexaZRctpZBYOw= X-Received: by 2002:aca:230c:: with SMTP id e12mr1755052oie.153.1571295577291; Wed, 16 Oct 2019 23:59:37 -0700 (PDT) MIME-Version: 1.0 References: <20191016143142.28854-1-geert+renesas@glider.be> <5da7a675.1c69fb81.a888.0911@mx.google.com> In-Reply-To: <5da7a675.1c69fb81.a888.0911@mx.google.com> From: Geert Uytterhoeven Date: Thu, 17 Oct 2019 08:59:26 +0200 Message-ID: Subject: Re: [PATCH] of: unittest: Use platform_get_irq_optional() for non-existing interrupt To: Stephen Boyd Cc: Frank Rowand , Geert Uytterhoeven , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List 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 Hi Stephen, On Thu, Oct 17, 2019 at 1:23 AM Stephen Boyd wrote: > Quoting Geert Uytterhoeven (2019-10-16 07:31:42) > > diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c > > index 9efae29722588a35..34da22f8b0660989 100644 > > --- a/drivers/of/unittest.c > > +++ b/drivers/of/unittest.c > > @@ -1121,7 +1121,7 @@ static void __init of_unittest_platform_populate(void) > > np = of_find_node_by_path("/testcase-data/testcase-device2"); > > pdev = of_find_device_by_node(np); > > unittest(pdev, "device 2 creation failed\n"); > > - irq = platform_get_irq(pdev, 0); > > + irq = platform_get_irq_optional(pdev, 0); > > unittest(irq < 0 && irq != -EPROBE_DEFER, > > This is a test to make sure that irq failure doesn't return probe defer. > Do we want to silence the error message that we're expecting to see? I think so. We're not interested in error messages for expected failures, only in error messages for unittest() failures. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds