Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5976937pxb; Tue, 16 Feb 2021 12:25:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxT3kJGa1qiVsDFujjwmIUTRKTH08sDojlRAupgdL6ysUe5yzaJAVWFuGwxDTnlY4hxsLxz X-Received: by 2002:a17:906:f14c:: with SMTP id gw12mr13089002ejb.150.1613507136438; Tue, 16 Feb 2021 12:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613507136; cv=none; d=google.com; s=arc-20160816; b=QJHUGBT90vRq84X2gncS+LG7uh/zoezCCsNpW+AuB9oTh1HZHFhTj0AYHWI15to4oA 13SYWoz0P/7Kptmh8hTfOCnIo9NMdCfUF/vxU/N2u/n0Ask2BNWZ9KX6Uh15E1hneJjV d40qMTgz5ndQOlbgJNNaWT66sL+dbMQYNhBl7pBzRN3+oPsqyoOPzV5QW2lMBbD3ZOLv od50BwgMUa9VET4Ryz4xMFB7iNC+EzEsJ8Y9ElKt/dFsbs08esvLBHjboEuyPrz+zZfy 8UIFNwpXyh6rHmons35XeAwUGVsbShC8f17EFL/NUkOQtHcMytbK/JzOpRysi5L+yYOS QouA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MNL6q3NMPg7Av9dHHI0hPvFwAb0XgQMgvvPlpO0wi9A=; b=v/Wih8sXr1oQie9R9EeSuRsiqB5gwSc9lyY9FFCmjdS+BVZLDZH6wIOwLxm+wKsWfS XYVWWltpQ5KuoCq244NUk8OfxkFLZbOv3/KSRaaD1v26rENYLlY/5FKgIVJkjxIcWvKT hzBTkx/5YARpLKcq81qSu3BUk4mxZ6G6mhA/WamzMCAZZSYck0VF2+R6wvQ+UOE3I8yt R6obZgiioPt7kGksusY2/9uKeeMPZnNqKnpytLDKnLBtuAdbUp5VuHYWVQiPknDlG0jx qb0eSGzlIIpW1p5I+0QKit7qCVZxpQmTU1iTzxLq+O5t5zJOJeyG7mF7JrXpsq6+fPRz QKYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Nnh3fpic; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f17si15443214ejd.597.2021.02.16.12.25.13; Tue, 16 Feb 2021 12:25:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Nnh3fpic; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230125AbhBPUX2 (ORCPT + 99 others); Tue, 16 Feb 2021 15:23:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbhBPUX1 (ORCPT ); Tue, 16 Feb 2021 15:23:27 -0500 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32B2AC06174A for ; Tue, 16 Feb 2021 12:22:47 -0800 (PST) Received: by mail-yb1-xb2a.google.com with SMTP id m188so11606137yba.13 for ; Tue, 16 Feb 2021 12:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MNL6q3NMPg7Av9dHHI0hPvFwAb0XgQMgvvPlpO0wi9A=; b=Nnh3fpicXOiF6LT0Dj/jd9+od7qquP7CGGgKWPr26ujuQwuNmLLqQRNqsWjwOd2p0Z ZWgDh1ttk03h5DD6ZcPnGWqOY04r5+Pm5JncEAFf+WSNShJvRo1o11/jPki0x/DUkgfR frPWTCmjs1PQfuWoSq0MJIjcGAJ4uYruIx+GGyoMYUpJNZfhJ1JBQoXAkJLs7gcIQSgb Mrk1b4kKm9niuyb6myGGYS9yoUmzplfb+229WVLBpBVgYahM6tappH61STGa8m4S5mmB 5zBMQl0Mlhzb+2E7W504TmyoK+cdirXGPxs3+DwyIXeqF+zaTySXa9O/BijfXn/5zll+ bKFw== 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=MNL6q3NMPg7Av9dHHI0hPvFwAb0XgQMgvvPlpO0wi9A=; b=Gmst9Ch+aKk4Bz6+R27Sxmmb/XD6urn32lRXfN59owBABxB1AeRQ31kxha16aCgZsc V4AkjKSM0ozplljfHoAddKExT3V8PgPRT7N3yuhLEdxF0/maijxudQorBHy8ltRWnZE7 kHmPFqBCfEumasA6CXyOgDC9dtcjUj2MknUCKQD1kpTn3rPZEMLRbwhwvbyYmYSn6xj/ OsMqBaVwawYbh4ZSNuFJQ9qcFfDjKamHoZ09FRO04VT8H5uibM9FpcfhLV/h8r+V06e2 b+7Gh2D69s6z0VW7HIYeqPzpsKMenR5lWEPMa2dUHWs/Ge19yoygI52FGm86o/g5bRJB zfWg== X-Gm-Message-State: AOAM533FFReRJRJxFSMQGLQpnDIA4k1Wxzlu5UkvN4MeWSxrUB/f0WgV QDhcG7oWa5xoeQlM6UhSIh+aSn47CfeZ0fYym95cpw== X-Received: by 2002:a25:aa43:: with SMTP id s61mr34252451ybi.32.1613506966197; Tue, 16 Feb 2021 12:22:46 -0800 (PST) MIME-Version: 1.0 References: <20210215224258.1231449-1-saravanak@google.com> <255a5fba-d5a1-0c40-c26c-2f6ae0e91d56@metux.net> In-Reply-To: <255a5fba-d5a1-0c40-c26c-2f6ae0e91d56@metux.net> From: Saravana Kannan Date: Tue, 16 Feb 2021 12:22:10 -0800 Message-ID: Subject: Re: [PATCH] of: property: fw_devlink: Ignore interrupts property for some configs To: "Enrico Weigelt, metux IT consult" Cc: Rob Herring , Frank Rowand , Linus Walleij , Greg Kroah-Hartman , Thierry Reding , Guenter Roeck , Android Kernel Team , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 12:20 PM Enrico Weigelt, metux IT consult wrote: > > On 15.02.21 23:42, Saravana Kannan wrote: > > Hi, > > > diff --git a/drivers/of/property.c b/drivers/of/property.c > > index 79b68519fe30..5036a362f52e 100644 > > --- a/drivers/of/property.c > > +++ b/drivers/of/property.c > > @@ -1300,6 +1300,9 @@ static struct device_node *parse_interrupts(struct device_node *np, > > { > > struct of_phandle_args sup_args; > > > > + if (!IS_ENABLED(CONFIG_OF_IRQ) || IS_ENABLED(CONFIG_PPC)) > > + return NULL; > > + > > if (strcmp(prop_name, "interrupts") && > > strcmp(prop_name, "interrupts-extended")) > > return NULL; > > wouldn't it be better to #ifdef-out the whole code in this case ? No, #ifdef is not preferred. That's why we even have the IS_ENABLED() macros in the first place. The compiled will optimize out the code. -Saravana