Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp1037309lqp; Thu, 23 May 2024 07:23:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvjPgmXZrx4A7h7M/2ercWCAZyNgombUxT+2goY2afyZsUMbgZkffClmtKlOYyoeFFxI5wakStKbIHzshASj5BmgHgURslUGy3dkl5Ug== X-Google-Smtp-Source: AGHT+IFoQ5se/SgeiJCVaaak993Xif15kkNTGXjqPvLyDEEjJzxKAO40pM2aHKM+l6W/NQM1UVcc X-Received: by 2002:a05:620a:f02:b0:792:bc96:233b with SMTP id af79cd13be357-79499443d30mr636683985a.21.1716474217966; Thu, 23 May 2024 07:23:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716474217; cv=pass; d=google.com; s=arc-20160816; b=th7oIUCv+BnwdAfspEyKhfOiKkDpxLBkf2fGjjnoVfDtmYh+nojbND14CCGFWapnO+ Orv81fiMAacnol1cELE1yZ1Fx+8wbL49+F50RP9A45+RRasb+sT/SxLZQ5j32p1gIzgB 5bDOb+z35iAYwETEA9WqN1bMWZVa+HJ5vAx2gp7gvVN5GFxS8N66ypoL2NpySBqBeCCn lztQ+f95xbkmVpkcyC4iViy/GWf7a0SDxkXuYtQVTFZn2OMd3O5yetrRbMQUl5JYB/Ug TIADLuz/dH3Y7wyhdwWOrNxe1poMbumDFQNmblVJscytz5O78kfLlhJcN/xDCZ0ifFF+ aMGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=t/lNADwPwr25pysfe9uC4MhtrxN5wTcZxfw/uoqzjrk=; fh=1KRvuVKuiIghR0q8Lncfej/3VF/ivo1lCkbm4Gt8MTU=; b=TWUvpDE1zOLQ0WsXaRrtqbDgluyWCorjYGWD8aQlUyncojiAqwryq0SUZKwpS1qXS5 BrgOAsQ2c+BBuV1mer6FG3FDrHAK3HS+0ENl+PG/JqUefaUVPtOZ/Gaok2eULK6DW+hJ edoa21iUi4bRToCUMq9McvcPmMGmsFJZHP72UymDw2Irmha+5k/xKncpazGCvA3JpEOj OHw7npUF62FMZyImx5ZLWoAWhDfCSRRXyCIQBIvRSaoAnsyXOg5hdMThMHXMupXoIFFK xgavuyP4lfk9bcT4Wg9P68ZSyxc07r1fw1IJoh3TgDLvJwkRx4xO+XTRcePw8r5MvNyU TTlQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YDO0BB+N; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-187634-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187634-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf33791csi1176450485a.421.2024.05.23.07.23.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 07:23:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187634-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YDO0BB+N; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-187634-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187634-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AE6101C2143C for ; Thu, 23 May 2024 14:23:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B74FC14BF92; Thu, 23 May 2024 14:23:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YDO0BB+N" Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70BD014AD17; Thu, 23 May 2024 14:23:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716474207; cv=none; b=HfWONqAJD3IKUXDJyd0NmRlS+9LHZQEFkjMgDG4i5rujKrhz4FtRTq9RxRZnCoKKYciPZT9qciDoHMrekTd/pnp5G+vDBA4ZFdVx2Ya+uEoghG0Y0BYuNqjkLdbEChgpTHrF7Bslg1g6ZjcLeNLopOkdXHHmmJxSggs18sTWkKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716474207; c=relaxed/simple; bh=JJ7bmhmcdNu8MKywaSirfkV+WFbvuDMYyJFOVkiBXjE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gVGwibRh6TNM7Kt8XGwjndoA4Zp5M9ckOJfUWTbYmSfZRy69lVGYHZtbOwVy8MVVNMUlByvZVxAHATUi1y7XA6CaVtdiQSI6J2KfLMzhYnExevMrdklMmhNsfs/Bo5WWlnBAR2i+oiBrJn30wJBi1kJiJQ9Vpe3G3nwdwDwmkyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YDO0BB+N; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6f44d2b3130so3432754b3a.2; Thu, 23 May 2024 07:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716474206; x=1717079006; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=t/lNADwPwr25pysfe9uC4MhtrxN5wTcZxfw/uoqzjrk=; b=YDO0BB+NuwXlDvo2rV6k+PnTabfQjYkUWTwhya2kRn5s6sWfv5pR4qpoypnBo2FeQx Pklz2TPD9BSqfNAQEc71JRvuxwLU043Ds67z8lFUNJJdYpWr/Ci/aCpSP0LKIE0IuV9f BVLJe1AA+i9K+z0DAesYeMz325uU6uZJKq6L6I3on3sOYxgnSLm6QYr7TF5dRJ7MPya5 l6EuyOBU7mp3Ah4w0436OJ3hE/ihlvQlx7V026s13nL8qKGqlqAzXFQoXqGQfMArcnZ1 ZzKvRAxrmWoTKS/Nq4VY9zFwzmzxoTmw7ocTNAtlMhd7FnwlWDHpMSidklQ7gJN2LFFY 7fhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716474206; x=1717079006; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t/lNADwPwr25pysfe9uC4MhtrxN5wTcZxfw/uoqzjrk=; b=NfEa19+L7gnVJuzlDoWGxSvtb86XJPEFD1TZH7owPpz1MuSQXn0svYq7zGMOGxbobG 8CnRZQ6LtIkrtAvFnI1tVwEouLLrBXasy2ZpXpcZ/J/5qq4rkU/ryaGkgME/QNQ4+aft JweF7SXIpWcLhLIFbgC+cs0vTpH70rdjL21lWy2l9b77oSqJE5p9rS0D5Ga0+4wkZumL Yiu+uX6zNDzXTDqZomytksesOGXeR+bStXQJcUIOUgzA6I+Na58k3+7XhupNW2okE9JA 6IGFqZF7R4w86bJzLjzyNCWR+1YBJL4J3g06mfeDIw/zsJzStnva8S9iNAPVp54AcGHU bfPA== X-Forwarded-Encrypted: i=1; AJvYcCWjHAE6F+VoqdoKmYRB2eJZNF81Ob33+iwkV0RXPCmQAXA1i9ToHXGTDA3YFDZKKbl3ZtYGFsQ+P3OailIiNtinE2IrzsYo6pQjiUJxWurEZAz0zeEHRT9STnnGKw1VMIKUZOW4gpUuyZjJJ+vxgmxUNAPWWDG0J8/T+SfUHsNv0jntw8jh1ZLk34REL61QGpsVx0qFcKbgrOgUgxjJ3qtPk2t7Zu7kePfzpQtxj3J/wGSGhJbF7A1o1msWHw== X-Gm-Message-State: AOJu0YxXqSq2QlwYUf6LiVmLHzK7pIwMewxwsg4a6BRB42bHDNMmn9kw mPUKaF+5I+0nl4Z/oukfG4yGokdLcUpdSY32okVv0YeSm3zP5ZzX X-Received: by 2002:a05:6a21:999b:b0:1b0:31c8:edfb with SMTP id adf61e73a8af0-1b1f8a8669dmr5803662637.60.1716474205714; Thu, 23 May 2024 07:23:25 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a665c0sm24088995b3a.3.2024.05.23.07.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 07:23:24 -0700 (PDT) Sender: Guenter Roeck Date: Thu, 23 May 2024 07:23:23 -0700 From: Guenter Roeck To: Lukas Wunner Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, 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 Subject: Re: [PATCH] sysfs: Unbreak the build around sysfs_bin_attr_simple_read() Message-ID: References: <2024052334-nape-wanting-0a2a@gregkh> <05f4290439a58730738a15b0c99cd8576c4aa0d9.1716461752.git.lukas@wunner.de> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <05f4290439a58730738a15b0c99cd8576c4aa0d9.1716461752.git.lukas@wunner.de> On Thu, May 23, 2024 at 01:00:00PM +0200, Lukas Wunner wrote: > 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 Tested-by: Guenter Roeck > --- > 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 >