Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4352877pxu; Wed, 9 Dec 2020 15:08:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzN3CvQZB/hY3a0a4hZVf44k5vxKANa8UNuFiNeje8i6XjFzwV0nDMHYgcGo21Miryxopov X-Received: by 2002:aa7:c7d8:: with SMTP id o24mr4208448eds.328.1607555313296; Wed, 09 Dec 2020 15:08:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607555313; cv=none; d=google.com; s=arc-20160816; b=OvzAaUzl2mVFDcVATgrfWivG8D1gToM5s3Zo6R1PHTzORK2mUVrVNVJOgxrIPiYr5K LVz6AwN6VbI+3SlU7eEYuSly97OnSicM0u6bSfwya1dicxKqyMKpVPIemBQX+Sv/dFzb JLY95VwEncID9shpMGXl1UsWBsSXnyrYzoktYS6UqoIbj66Hp4f/j5bQuxdytE81ivjm J51ogX77PeIYS5WlvVnOmrBzdbPK0NG3tbL4j4i35sYn2VBaqUCJYDg/ravQtofMbRG2 ZnhQRcEo3XghqSPfA8dSE+WhOrOpDZDfMrhPpllMUtpIdX4PqPNVT3sOBxLuX5/Zz/88 OiJQ== 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=f0o9HV4KJgD2jVsLvVvqGupCftB/NslYrnys3X7EyEE=; b=d0d+OJEKAcRc/DB2bQ12T3svM3i5kTU5BoXtwnbIppf804Aqtzj6rUKbP/Lohvn6uT G4g6WbUbtP4WMCyQO74B6Gj21+fcNPlBjSuAbwyjTF4KBHBJ36boGzpLFSjXMZSpo6RH MZiCOFHmNHhLSNZ4rFllRx6ngLmjh0lQD+RnO75hIbCFC31Drn7IMyjd1pWRfij7UFbz dlRx40prKweZ5wngabP9R/x1EFWNTDM0WJHDvwjgQ8OPagB4Tip5TDxzl2ltSb5S7c4T lcwHo0zzSqAiLnkh0Fq18WITLhjt8fGo8XfPMhOAP3ZwFmgDRnl8GrcP/eqfdGf81MtU /+1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R3Dmty8v; 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 lv26si1513854ejb.218.2020.12.09.15.07.47; Wed, 09 Dec 2020 15:08:33 -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=@kernel.org header.s=k20201202 header.b=R3Dmty8v; 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 S1730446AbgLILGI (ORCPT + 99 others); Wed, 9 Dec 2020 06:06:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:58548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730371AbgLILFw (ORCPT ); Wed, 9 Dec 2020 06:05:52 -0500 X-Gm-Message-State: AOAM532FxAIWtrz3GcSyx8ySr6w4NVRAuNl3+Yw2/Go2Qoxe4JcouzN2 jqzgKGpF1/Qt2pg2OT7C4FHzxSyrQmnmPBquyy8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607511910; bh=iHRngC0ANhFxQ/UVZdui4aIYpUOkA29G/4HhBsdC2io=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=R3Dmty8vAYJKDiZUPF1JhJ/fkjvu0FhjsyBn5KjqeSujEf6PHTNzyF+WXZ/w76xNg QS+fe+Efir3U1mO7MR1r5psbffnGBO/51pjVdNN2MbZ3G5h5uUNQIx+KsGYuw5KtWU vW0zaQr7ETLlHN8lNEGbzDZ+z543kEozSdv2WDChe55Pnmgrr37nJBqHI6WqI6SHPq y99YomOV0Dk9i8y21F7gJ8XLaIifIlWXOG/j1puForpugoXaf3ekzTHrhVQamBLSfh bjhCYQDhx0hHgqM5nOmG5LstUgXtDzlYhZlc6Bup6iZS5Yo5Rl8C0XFMbjw3hBPKaW ntlLsccWVXYJA== X-Received: by 2002:a9d:7a4b:: with SMTP id z11mr1211764otm.305.1607511909951; Wed, 09 Dec 2020 03:05:09 -0800 (PST) MIME-Version: 1.0 References: <20201208164821.2686082-1-paul@crapouillou.net> <20201208164821.2686082-2-paul@crapouillou.net> In-Reply-To: From: Arnd Bergmann Date: Wed, 9 Dec 2020 12:04:53 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] pinctrl: ingenic: Only support SoCs enabled in config To: Daniel Palmer Cc: Paul Cercueil , Linus Walleij , od@zcrc.me, linux-arm-kernel , "open list:BROADCOM NVRAM DRIVER" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 9, 2020 at 11:13 AM Daniel Palmer wrote: > > Hi Paul and others, > > Sorry to hijack this but I actually want to do something similar to > this in some other drivers. > The targets I'm working with have only 64MB of ram so I want to remove > code wherever possible. > Is there any reason to do it like this instead of wrapping the whole > unneeded of_device_id struct in an #ifdef? > For example there is a rule that the compatible strings have to be > present even if the driver isn't usable or something? No, there is no such rule, but adding lots of #ifdef checks in this file would be much less readable and more error-prone, as you'd have to make sure the two #ifdef blocks around the structure match the one for the ID table, and any function that is called by more than one SoC has the correct combination of A || B || D checks, and nobody ever gets that right. Arnd