Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp220070rwe; Fri, 26 Aug 2022 03:59:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR41nq2G4bj12mEedR+c9gP05/3QJMAn79E/s8O1PtRwH7o9isfcQ6xlYpA3Uu+WHhykPEWI X-Received: by 2002:a05:6402:d0b:b0:443:df38:9df with SMTP id eb11-20020a0564020d0b00b00443df3809dfmr6220363edb.9.1661511541260; Fri, 26 Aug 2022 03:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661511541; cv=none; d=google.com; s=arc-20160816; b=V5GxJI4GUw3eAkS2V/xpxZdrx+Ynv7Z1C5OS/335MYKu/q19nmgOttdIX5EGeyczz8 EnN9ZJdOzFMDhqRgDjOwBJ+b24Y8tJQ6iSTp+MwTr3QLGGgUKAbkG2HgDK16t+1bF4YP wOEBp2WC3wCHoJVl08b6mu65NMe/8iShAKgVdykxFOz1RMnG6jW5JewxkTrzXTXJigjo cecdAwPrFykBHDDe1kI7hehc6quEaYIpd3FdFm4jCt3nqq2nA8vWQosS19EIUbmDN2no crARb168bBjEa7lFo4PCD5FpURZJ2qHDWBfMoiOiAw+PngJGyCDXZ9ap3Exf2wugGGYN x1Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature:dkim-signature; bh=aa/3ypYSJSQW433oi1w/2O4+8Mbdi8Blp1YdWljoRSg=; b=UvfAIjthIXt8PXVBlUuUHn8zQUitIsYIPUK1y6OX3Lpaggs8magMaBf2SrmEhShHof EO+LVSHmwsk86x3cpvOVIUoNHFPJCPPDEt6OnUhd1FNDHOI87S/XvcyxDUHsOYoPYB6o 9E2dK+8F4cQWrCJZktJVpkIEYUf+0BGEmg+wz07kiv8ADVOmm0OigYr1hzaaHC9q9j6R JZ02cmDPsNy/8iTD0eda7ajJy/k3G3VjqvieGqq2Sx1fI5tyejfdsJ3X+DTArCkR9psf r5wvF+6J1NBTisfpOwg7v3S+sWH1TEiOqtZyJgt8l9CAJsLa8qcs03EpBJqzZIAoWYAP CPnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rEmlke3o; dkim=neutral (no key) header.i=@suse.de header.b=tHGd5UQX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb16-20020a1709077e9000b0073bd9e4e634si1110185ejc.730.2022.08.26.03.58.34; Fri, 26 Aug 2022 03:59:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rEmlke3o; dkim=neutral (no key) header.i=@suse.de header.b=tHGd5UQX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343865AbiHZKqQ (ORCPT + 99 others); Fri, 26 Aug 2022 06:46:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbiHZKqL (ORCPT ); Fri, 26 Aug 2022 06:46:11 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FF8B3FA04; Fri, 26 Aug 2022 03:46:06 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B663E1FDA9; Fri, 26 Aug 2022 10:46:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1661510764; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aa/3ypYSJSQW433oi1w/2O4+8Mbdi8Blp1YdWljoRSg=; b=rEmlke3oS5xgtWurko+VQbWOg814W/WaYopKvn6LehJnfbW1bMJQb5ur1/cVEQX3+KDwnz Gn1H//eh+uuco2IKLZZdgmclsuQcjxMtuXfJek/bwGn4Qo5PsGpZjkdjfPUfWc46xQAnVY WmZ670H63mvj+djY3YHiXM4D6KGCCEY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1661510764; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aa/3ypYSJSQW433oi1w/2O4+8Mbdi8Blp1YdWljoRSg=; b=tHGd5UQXO8TmzcCocfN/smLfbn4Z7fne2gDb+sUqnSK8WJWYedige4XOnK4eNNotFVfhx/ kLxQe2exohFupjBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7F09413A7E; Fri, 26 Aug 2022 10:46:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id X2U2HWykCGNhYwAAMHmgww (envelope-from ); Fri, 26 Aug 2022 10:46:04 +0000 Date: Fri, 26 Aug 2022 12:46:03 +0200 From: Jean Delvare To: Andy Shevchenko Cc: linux-iio , LKML , Jonathan Cameron , Lars-Peter Clausen Subject: Re: [PATCH] iio:accel:dmard06: Optimize when CONFIG_OF isn't set Message-ID: <20220826124603.4a28a154@endymion.delvare> In-Reply-To: References: <20220825144012.24a33bb0@endymion.delvare> Organization: SUSE Linux X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Thu, 25 Aug 2022 23:12:43 +0300, Andy Shevchenko wrote: > On Thu, Aug 25, 2022 at 3:54 PM Jean Delvare wrote: > > > > When CONFIG_OF isn't set, we can optimize out dmard06_of_match as it > > will never be used. > > NACK. There is a magic PRP0001 for ACPI case. OK, I wasn't aware of this. As of_match_device() is a stub when CONFIG_OF isn't set, I thought the table could never be used. But now I see that the acpi subsystem accesses the table directly, so you are correct, the optimization I suggested is bogus. Now I'm curious, is there a well-defined subset of device names that can be found in an ACPI table? If not, does that mean that any driver with an OF entry could match, therefore of_match_ptr() should be removed from the kernel entirely? Another possibility would be to stub out of_match_ptr() only if neither CONFIG_OF nor CONFIG_ACPI is set. But I'm not sure that would be worth, as I expected either to be set on almost all kernels in practice (except on s390x, but you wouldn't build any of these drivers there anyway). -- Jean Delvare SUSE L3 Support