Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp914220lqp; Thu, 23 May 2024 04:06:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVxchXrj46uCW+LbbR1vhMJI2c7hgI3xsViEuQT7lCKJk80nTmSYX2/z8ZI+jiqgDP4f6MBxQP7Szdzqado0t71WV7aNg46SvdeH9I3JA== X-Google-Smtp-Source: AGHT+IGkHC3MdDM2xzMNJ3rAwQF/PfSsgVSv43dF8eIQzTSwBY2Du6hPDS1oduikls6QbIX+6mwc X-Received: by 2002:a50:8d16:0:b0:570:374:fbf5 with SMTP id 4fb4d7f45d1cf-57832c54d91mr4113585a12.39.1716462371418; Thu, 23 May 2024 04:06:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716462371; cv=pass; d=google.com; s=arc-20160816; b=fGerhqUsXOJ2Jkgv8TsxViXZrJhK1TJDj5xwHEaMKbo6/U8T0sAObSEPq2pLMZ9SOL 5WSPCycRWiT9QgZBr+DVV6p0ZalrgVwL4NOi+BYIvA5mYHS/EPgfN+rroZav0q8HiI8d w85mOb48g+LZ4GJhsEwA+6gLbA+fdjvd+Lj5YnZawU87f8WQuOhveTb+L+rVxF6Fw6cX 6HZQmAM/fhXBwc/s7bzDmBvHF5kv5d9srUrzbn+R6VzD+uH/pBujInNperA7ZQVptZU5 8M2djNXmRV/YxS8opHnAiLt+M9tF+pyEiJlYyWx7IROojfzXWArpRtKDTP2HD+HmrJFc f4zQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:references :in-reply-to:message-id; bh=yyOyu2HR+gIKHU+c1mN8SeXtCjsMQPYrDrl6hLQ77ls=; fh=v3L2KFjkadGAkzkaDum5MIWqUpc0m5SibwQ65qhOmoI=; b=ES6+tkjghz84lgxnSZo3EnKsrmAWRuDi1LLF5iGDam6UR37ONF9v3zxcHh57dz7iV1 fOSaoSkSlU7pNmNjF2cQbC552f9NHqhvQayZXlkRN6DNIRjGLq/XnGTWhluXPrCZvpN5 IhzwPs0ONaEn7zsWLp6NdWq7VlCpapJCvA02rcEEkPi19/7fOt2eMaTXtuUACVQZNNga K2rI65y1juLbNQ6QGtdD7T5oYaWWYgXdgX0EtWvERPhn/YSDGtcY7/31cSmEzxXo6cCe VdkZs4uyv1vAYSqimXBdWPgBeCQQyy7qk3HLw6rzDpmin5ncOJqIxLc4uVCU0plL4m9h aMhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=wunner.de); spf=pass (google.com: domain of linux-kernel+bounces-187371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187371-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-576b92b644asi5067498a12.370.2024.05.23.04.06.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 04:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=wunner.de); spf=pass (google.com: domain of linux-kernel+bounces-187371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187371-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2C8021F21CD2 for ; Thu, 23 May 2024 11:06:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AA1E144D0D; Thu, 23 May 2024 11:06:01 +0000 (UTC) Received: from mailout3.hostsharing.net (mailout3.hostsharing.net [176.9.242.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91C3546AF; Thu, 23 May 2024 11:05:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=176.9.242.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716462361; cv=none; b=Cw2Y4HG0bVyADl/F/Qi4rweT+5WGSPo9/g6OJYfhljI75trSCBSgsp2Fhctcw8/riS12cc7N6lXmwseALINX7wdQSIq57wjMbtfYuIFQd5gsmCvzyh7J8tUCO7jEN/LUXrRaPmPucv2TvCX+LSpBpiV4kuLtMp7YBeokp9sR/Vs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716462361; c=relaxed/simple; bh=1iwYUuxtNs1jjZ796ZpZFQ+C43XWPyywwcrX4m2EB9A=; h=Message-ID:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=jCFA0A//+1NrV9LmRgPlTC/ZliYtEpjeS3pXnF9L67FCcB3OhUW4dxgFIK6kshM3dimmxwm1QbsEllIZX++qiDavZrW80/+sAe13WbFPpAbyFeLEx4mDSv4fgezPKS2lJQZ836HbfYpxOvY+PRdsM6EP4d9A4PRQoLODamSB9Lo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de; spf=pass smtp.mailfrom=wunner.de; arc=none smtp.client-ip=176.9.242.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wunner.de Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by mailout3.hostsharing.net (Postfix) with ESMTPS id BFDF41029124C; Thu, 23 May 2024 13:00:02 +0200 (CEST) Received: from localhost (unknown [89.246.108.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id 6AD8F603EE84; Thu, 23 May 2024 13:00:02 +0200 (CEST) X-Mailbox-Line: From 05f4290439a58730738a15b0c99cd8576c4aa0d9 Mon Sep 17 00:00:00 2001 Message-ID: <05f4290439a58730738a15b0c99cd8576c4aa0d9.1716461752.git.lukas@wunner.de> In-Reply-To: <2024052334-nape-wanting-0a2a@gregkh> References: <2024052334-nape-wanting-0a2a@gregkh> From: Lukas Wunner Date: Thu, 23 May 2024 13:00:00 +0200 Subject: [PATCH] sysfs: Unbreak the build around sysfs_bin_attr_simple_read() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Guenter Roeck Cc: Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, Jean Delvare , Ard Biesheuvel , linux-efi@vger.kernel.org, Zhenyu Wang , Zhi Wang , intel-gvt-dev@lists.freedesktop.org, Daniel Lezcano , linux-pm@vger.kernel.org, Luis Chamberlain , linux-modules@vger.kernel.org Günter reports build breakage for m68k "m5208evb_defconfig" plus CONFIG_BLK_DEV_INITRD=y caused by commit 66bc1a173328 ("treewide: Use sysfs_bin_attr_simple_read() helper"). The defconfig disables CONFIG_SYSFS, so sysfs_bin_attr_simple_read() is not compiled into the kernel. But init/initramfs.c references that function in the initializer of a struct bin_attribute. Add an empty static inline to avoid the build breakage. Fixes: 66bc1a173328 ("treewide: Use sysfs_bin_attr_simple_read() helper") Reported-by: Guenter Roeck Closes: https://lore.kernel.org/r/e12b0027-b199-4de7-b83d-668171447ccc@roeck-us.net Signed-off-by: Lukas Wunner --- include/linux/sysfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index a7d725fbf739..c4e64dc11206 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -750,6 +750,15 @@ static inline int sysfs_emit_at(char *buf, int at, const char *fmt, ...) { return 0; } + +static inline ssize_t sysfs_bin_attr_simple_read(struct file *file, + struct kobject *kobj, + struct bin_attribute *attr, + char *buf, loff_t off, + size_t count) +{ + return 0; +} #endif /* CONFIG_SYSFS */ static inline int __must_check sysfs_create_file(struct kobject *kobj, -- 2.43.0