Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp623790rwe; Thu, 25 Aug 2022 06:33:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR46nZ11oN9Tg2Rcqu54dxHLLg8yDWL6F3f1s7URhYMhN9ncGiuvSk7nnxkNqRvNbPYdBuph X-Received: by 2002:a05:6402:353:b0:446:2d2c:3854 with SMTP id r19-20020a056402035300b004462d2c3854mr3278456edw.193.1661434439397; Thu, 25 Aug 2022 06:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661434439; cv=none; d=google.com; s=arc-20160816; b=mDwXyi6Hz9wn52aUuAx35TX83VUAm6hGgym0vm2GVO5OUZatV3wkDr9J1coaLjzrIr X4Sjy0O31U/Lq5lhuWLoqJM+XKnF8TC439jLoVXpgPY6Wx6pZbGnx6OjA/kF5Lm32jAx bQLCeKRNWWrc8OkirwRkuzWZv0wWBcS2Q3Sgl3JBZchHY2h3irJUqN3UI8jNZyahtwAA ujy7VwQv4mmOkZcXbXuTT7e87abqvHL+7ppKi3A79j5979v6GnVIbkTqjUQxErqLiR/F WG0PFwXKjfbeNXUA6KpcGO/OmwOSTJ4TxdkRdtC0uOjEjfuUe7g6kljKFiHc1asiOtPG htDg== 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:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=m+esSZFT3CEpb8V0GtG2lZxTFRI8y+pv8iwD+6oOC0k=; b=JtU2tTFNVVc5KYqfOLZA2x/6bdOa9bmuo+Z25Rj38FgA9ctTfzNAqFgj6sfFBMdo9g p1OD4LopTL5HsBqT18KeUVNCtHV4WQfL+PAOK5TZ6XUYb8SOXs8hJaahUP2rGZDP8hNt bRJ0bW7mP4YA59cpV+lEjJA1OjruJUMM87vCNehusCH+90Uq6Nl1cgEqP9LeiK1R00Fa gSTnuJJ949S7Z+7ErnXlpUPjrLM162NtcKKjUmV4F8F4ryEBAyYeVSbaPjJKNfpMxWtP kDOfk34uARXli+dX0B3+4RMbUw4TwUaqHgbK9tMiK7m8gEgfRFBG/Nbp6HA/MzUdA0oz hWRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=SzS2wPQn; dkim=neutral (no key) header.i=@suse.de header.b=gxj3GYdh; 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 b5-20020a056402084500b00445fba6c607si7031112edz.140.2022.08.25.06.33.30; Thu, 25 Aug 2022 06:33:59 -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=SzS2wPQn; dkim=neutral (no key) header.i=@suse.de header.b=gxj3GYdh; 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 S235132AbiHYMkT (ORCPT + 99 others); Thu, 25 Aug 2022 08:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237774AbiHYMkR (ORCPT ); Thu, 25 Aug 2022 08:40:17 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60D271A048; Thu, 25 Aug 2022 05:40:16 -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 1A8EE205A8; Thu, 25 Aug 2022 12:40:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1661431215; 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; bh=m+esSZFT3CEpb8V0GtG2lZxTFRI8y+pv8iwD+6oOC0k=; b=SzS2wPQnUpq1EfUDLBdJXaxyVByWNEL3P1e8Ho8MsIn5+TUU5nx3QVAsZfNnxyUs8+6vw8 RatvXC3SXtggIjxd0TbnyZwOY5AqMb/P0ATr6td69/LFbutQJNf6eOT4WzDniyXA+Ow3Dt ooxnqg7s8/ZGxnPGWOIwmXwNxwCIyu4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1661431215; 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; bh=m+esSZFT3CEpb8V0GtG2lZxTFRI8y+pv8iwD+6oOC0k=; b=gxj3GYdh/sSww5BnxypS2QS+58hnAZ1r2LH5Z5lhC/rqrblZJDubWLdVCvy7DXLjVVLQ9V 8adjIUiNk9XFniCA== 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 D470913A8E; Thu, 25 Aug 2022 12:40:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id aa5SMq5tB2OjGgAAMHmgww (envelope-from ); Thu, 25 Aug 2022 12:40:14 +0000 Date: Thu, 25 Aug 2022 14:40:12 +0200 From: Jean Delvare To: linux-iio@vger.kernel.org Cc: LKML , Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH] iio:accel:dmard06: Optimize when CONFIG_OF isn't set Message-ID: <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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 When CONFIG_OF isn't set, we can optimize out dmard06_of_match as it will never be used. Signed-off-by: Jean Delvare Cc: Jonathan Cameron Cc: Lars-Peter Clausen --- drivers/iio/accel/dmard06.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-5.19.orig/drivers/iio/accel/dmard06.c 2022-08-25 14:19:11.742351430 +0200 +++ linux-5.19/drivers/iio/accel/dmard06.c 2022-08-25 14:20:13.505276596 +0200 @@ -209,7 +209,7 @@ static const struct i2c_device_id dmard0 }; MODULE_DEVICE_TABLE(i2c, dmard06_id); -static const struct of_device_id dmard06_of_match[] = { +static const struct of_device_id __maybe_unused dmard06_of_match[] = { { .compatible = "domintech,dmard05" }, { .compatible = "domintech,dmard06" }, { .compatible = "domintech,dmard07" }, @@ -222,7 +222,7 @@ static struct i2c_driver dmard06_driver .id_table = dmard06_id, .driver = { .name = DMARD06_DRV_NAME, - .of_match_table = dmard06_of_match, + .of_match_table = of_match_ptr(dmard06_of_match), .pm = pm_sleep_ptr(&dmard06_pm_ops), }, }; -- Jean Delvare SUSE L3 Support