Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp22619rwe; Wed, 31 Aug 2022 15:33:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR5piZzoHvYwzWsouP6VyS7TXcjoQ5IoKWdP8IYUgoJShhO/IYvKBBJ/+dIFl6rZncP0EVRv X-Received: by 2002:a17:907:c0b:b0:73d:c534:1ac8 with SMTP id ga11-20020a1709070c0b00b0073dc5341ac8mr21630773ejc.306.1661985223553; Wed, 31 Aug 2022 15:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661985223; cv=none; d=google.com; s=arc-20160816; b=t8yDRkvA1QyaQIsZ8kdahPvQwVJQekbNhXmO9PZe1b622g0fCsSE2/ZuhX+vka+AdB W+dyjmLzMjCWfrDNPU5Leqo9K4Eku4wr+KiO15lY+308IXgJv/REebCkZvzNoXITxQEF zFExpaL/RD8YGo4J9URJXhUh5pLMQuglFx5/b8zUKGEk6eXY6FqxQrYVNgAwv3DUhfFr 0aRG4JV+U4/F2U6LeiKtzZC+OKzJuHdjX7QD98fwVviVFyk1boSOMvYFwCrBR9naTDX8 3j6aB2hbOKbXPOViY9U4sy7rC5n5TzaiFuxVvh8DgarASInJ/u1s7ZwTgwgYnIIjLI6M ZAyA== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=l3Q5DvQGEH+WsVHsWcDeULdQu2Ku6pAIt7NlxRIeG14=; b=Og7YYTHvybQ6JJmjk3OH+u/uRHPflH05mQ9Dkbj99JWGJE/qLVilYaayXV+TM39Fxg GrMrMsJEAzB4hYoSJqeyyYIwCTVAnXQPwUTzkyT6Wfe/GOrQ91NFU1F43jaRJz/BodO9 kzCBBynxJcGn+zMJ7zX7XjHH2e/uouNvYIaMEzGO+TqRvqBy/l6de4zbHXdTRAXo1Qja YCOAvOxwNt/t1aZRUnYt7/SobMxnz5TpI0ToZJY4uVdkKFOhd3u/iBhf6+t7KqhDf/aM ZhriwfE7vwc6UJCIN28drtq3SoQokLHyZDXp2Yb0OZKiEDQNQosynKM4NbFNmaFs2jlO ouGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=FuYNtYD3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 sa39-20020a1709076d2700b00741991009e4si6802637ejc.560.2022.08.31.15.33.17; Wed, 31 Aug 2022 15:33:43 -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=FuYNtYD3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 S231766AbiHaWKH (ORCPT + 99 others); Wed, 31 Aug 2022 18:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiHaWKF (ORCPT ); Wed, 31 Aug 2022 18:10:05 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27188186D3 for ; Wed, 31 Aug 2022 15:10:00 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 2961422038; Wed, 31 Aug 2022 22:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1661983799; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=l3Q5DvQGEH+WsVHsWcDeULdQu2Ku6pAIt7NlxRIeG14=; b=FuYNtYD3P5RIynwDyFzL12UjoWn3QMLvxwHoLXbWEfz5NGAYlMjLenXCOMW6DgDDj2i0Qp /34GWtqNEWu/s45Mei703Rb0iFUuaqYCqDlIo4bufGDaLecl67jYYQYXxsN7akoHaHCbD8 PDLg7TUvXcWJufw1W4+C/sllWeWoEgI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1661983799; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=l3Q5DvQGEH+WsVHsWcDeULdQu2Ku6pAIt7NlxRIeG14=; b=dX0+XwxNi18qBpPaeNeoNVsHq0xLBPVgsFKomiwVzW1KKn7JldtqhI/MjifPsxl6Jq2K7p +uj/AOOqoOcXEhCw== Received: from echidna.suse.cz (unknown [10.100.228.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id E127A2C141; Wed, 31 Aug 2022 22:09:58 +0000 (UTC) From: David Disseldorp To: dmitry.torokhov@gmail.com Cc: linux-kernel@vger.kernel.org, David Disseldorp Subject: [PATCH] module/decompress: generate sysfs string at compile time Date: Thu, 1 Sep 2022 00:07:10 +0200 Message-Id: <20220831220709.28972-1-ddiss@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 compression_show() before (with noinline): 0xffffffff810b5ff0 <+0>: mov %rdx,%rdi 0xffffffff810b5ff3 <+3>: mov $0xffffffff81b55629,%rsi 0xffffffff810b5ffa <+10>: mov $0xffffffff81b0cde2,%rdx 0xffffffff810b6001 <+17>: call 0xffffffff811b8fd0 0xffffffff810b6006 <+22>: cltq 0xffffffff810b6008 <+24>: ret After: 0xffffffff810b5ff0 <+0>: mov $0xffffffff81b0cde2,%rsi 0xffffffff810b5ff7 <+7>: mov %rdx,%rdi 0xffffffff810b5ffa <+10>: call 0xffffffff811b8fd0 0xffffffff810b5fff <+15>: cltq 0xffffffff810b6001 <+17>: ret Signed-off-by: David Disseldorp --- kernel/module/decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Feel free to drop the to-be-expected commit message body if desired. diff --git a/kernel/module/decompress.c b/kernel/module/decompress.c index 4d0bcb3d9e449..c033572d83f0e 100644 --- a/kernel/module/decompress.c +++ b/kernel/module/decompress.c @@ -256,7 +256,7 @@ void module_decompress_cleanup(struct load_info *info) static ssize_t compression_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { - return sysfs_emit(buf, "%s\n", __stringify(MODULE_COMPRESSION)); + return sysfs_emit(buf, __stringify(MODULE_COMPRESSION) "\n"); } static struct kobj_attribute module_compression_attr = __ATTR_RO(compression); -- 2.35.3