Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1547222pxa; Fri, 28 Aug 2020 16:13:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6ongA0H6q8zKuJFYMvDXw3mGbZFV18SZ8B0OvXYRy/3xD8I6oBtyNN2+SEVsB8wYPXx99 X-Received: by 2002:a17:906:8246:: with SMTP id f6mr1100138ejx.278.1598656389353; Fri, 28 Aug 2020 16:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598656389; cv=none; d=google.com; s=arc-20160816; b=nP8ctvvACz4tzb7qKBwqBYOFUBxEQhrRP+J4XcESVUP2h+gLyNOrd6aBr2I8Prg7N3 pcQQQpQSVcF6cZERX4BxNk5ySOu1qm96toMSYDNDb5MSXhzVimTf3MurNrImhtLNHzCa tzlhZiv7u8CDFZS2TxZ3FUqIL7dWGYthcqJDhIEFCVCdFGr13Srmtn4qyn4nmITjHwFo eu3Axk7Nqkb4ffmUY2eMAGNNsyk1FSV8aBDcQu+JgV6o05RB86g2JDtiLnv7rqdOLGOo 0aaOsUn/8R/26V9K5/yiiQb63wAeusF/wQk3axUw8R2uswbybzClzlKQALCoopY/OCv3 4+Tw== 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:dkim-signature; bh=zS9dClf4MzM/hmHMKdYRA/ULQ9Ujhd3KsDLjDVpJ/PE=; b=BQ5lpigEtGzWLU2vxsIj/UTWeCmA2B1oBit6ae9IGyBDUEpVpCbT9Oef/GEFYMIouy XUXeVrGQr6BnS1anoElAPFK5gZfifGGXfZSxS2ngibMo5m2e1dp+hJWdo2A1muszZOpD dQ0CT0N6WexC24JvDq0oUC5+6EoY4k+wucPazWyWEdfl8ZwWtM4ej5sYukflxzwSEAAI T2so+4iTkq0quphQv4Uf+p7Ggxx2vo8HafiSwibaqPn/q3kz5xxzWJrAEtxggSpa2Bn5 owhXRAWezdCIZCoM/B9e3QBUo9fKkYCgbZ97LgDuWLPw+mB/VxAQ/IEmz0Rb26Vldl3g GyKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oui75Mnt; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si465755edo.218.2020.08.28.16.12.45; Fri, 28 Aug 2020 16:13:09 -0700 (PDT) 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=@kernel.org header.s=default header.b=oui75Mnt; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726720AbgH1XKF (ORCPT + 99 others); Fri, 28 Aug 2020 19:10:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:45162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbgH1XKF (ORCPT ); Fri, 28 Aug 2020 19:10:05 -0400 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 727412086A; Fri, 28 Aug 2020 23:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598656204; bh=cuzIipgBvlguG990N/YxERo27x/8SCCyR8Aa2meH1IU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oui75MntViOoplgl+Tc3SLIcjQ+hsfAAenAmW0GSBwQOZbM4d3b0h1BdONgTUV3W0 hqps76DCyv6YFuSYThWWdSZXRibH2XDDHZRjfIdUPz75FBXqCzxq3cEduqnnCDNJIM M29s4ztjnnJsJzm0D1+3dQ38XaHwWJcq1CZS897c= Received: by mail-ot1-f49.google.com with SMTP id i11so636106otr.5; Fri, 28 Aug 2020 16:10:04 -0700 (PDT) X-Gm-Message-State: AOAM531qBPwIwZZRuR0zacqAMQH7/F96iBQShkGjEzJ1LAvO3lm6xU7K mmpTzC+tZWPyISOu/K+w6v6mvwX0jJHqyrSUsA== X-Received: by 2002:a05:6830:1d94:: with SMTP id y20mr655920oti.129.1598656203809; Fri, 28 Aug 2020 16:10:03 -0700 (PDT) MIME-Version: 1.0 References: <20200828021939.2912798-1-andrew@lunn.ch> <20200828130034.GA2912863@lunn.ch> In-Reply-To: <20200828130034.GA2912863@lunn.ch> From: Rob Herring Date: Fri, 28 Aug 2020 17:09:52 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] of: of_match_node: Make stub an inline function to avoid W=1 warnings To: Andrew Lunn Cc: devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" 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 Fri, Aug 28, 2020 at 7:00 AM Andrew Lunn wrote: > > On Fri, Aug 28, 2020 at 04:19:39AM +0200, Andrew Lunn wrote: > > When building without CONFIG_OF and W=1, errors are given about unused > > arrays of match data, because of_match_node is stubbed as a macro. The > > compile does not see it takes parameters when not astub, so it > > generates warnings about unused variables. Replace the stub with an > > inline function to avoid these false warnings. > > Hi Rob > > So 0-day shows some people have worked around this with #ifdef > CONFIG_OF around the match table. > > I checked the object code for the file i'm interested in. The > optimiser has correctly throw away the match table and all code around > it with the inline stub. > > Which do you prefer? This patch and i remove the #ifdef, or the old > stub and if add #ifdef around the driver i'm getting warnings from? Use of_device_get_match_data instead of of_match_node. Rob