Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp397107lqs; Thu, 13 Jun 2024 13:16:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOleRQgiVrdkmHFju8NSLV3cLmC6qdSl5xML6e3InRuj/nFhlrteDOR7tcb/W+KzLCqH9MY60jYH+a6h0b8WJmoE8MRReeMdO6I+a8bA== X-Google-Smtp-Source: AGHT+IE9afCW4wSFMIkEQ9kO4vnmonrqmKhgBWhnFbXMLcV3qKvcWpe/dQsuD4NmqfTm9YqA3DTN X-Received: by 2002:a05:6a21:3a83:b0:1b2:b197:dcaf with SMTP id adf61e73a8af0-1bae8353b66mr1025387637.57.1718309799363; Thu, 13 Jun 2024 13:16:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718309799; cv=pass; d=google.com; s=arc-20160816; b=DLHzVhJmgDOQcaJcznkmX+jg4aHc8Jo+09aKk6t+pVKnHidxNegBJlIJvfpO+0ImpS R95iQyKEsw7wCTQ/i2BCMfI/oIF5Xr5HM253O2btJToIrXXvMhC2VgVMj2VXoGrSIPFr vaOf1lOqRICZ6kEgAgqcTguv+3BNNCMIL78LP3SizMxQa6MfeecCVXCpINkgEcLTsogE HqPwih30SqQZRz5bmtONIXm45577z804oUh5HWOrShsMkL1LIkCV9u82ZUXfVqTrKsdc xKf+TCE7x6Yg5WhUYZ6xgTqjgLADa7TFEPpE4bEJ8ADF0lWsEz3kDFjr8vYtl3UNf2IH N7Rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=fTCxt0y4pVpFKwIvlQnInbedO4hN8nNIvVwbZZFhWe4=; fh=+5ObgQnrCkea1AHxgRSNW3c6Bs1CPpqLGLF7R+P+iUs=; b=dJWZ0NMK9kf0HT3+6IJQ0UI97XKu1ZC8bi+OeTzZpq5nQO0TdZFvp66QOmhoTrnIuJ 4XIOJHAYI25Ce4GOkCaHaJ1EvVQL54IWqjERBnAd5CjraYovPg6+Bad5PkQ3F5U+PsCA dDR/HhBpHDukSMZ2QCmek11qrdkP6H7S5llxwq6Lz2BpQdn/CkYfCbBXhf527craOdXV K3vl70I7DEkVW8k2s0AQghdA50GYT+4UYbJxqvmXSZ1+/uAV93kMCRFPYnqE4E5wl0C4 2Z3ppq2lrx/I4BJKPh2Z/hRL42/ctoPy4Iu+0Si8/u1hVLWxwS8TAdataXXwpFov7vwG x9zw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=s6UXzttw; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-213979-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee67b7637si2053416a12.785.2024.06.13.13.16.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 13:16:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213979-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=s6UXzttw; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-213979-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 021432862CE for ; Thu, 13 Jun 2024 20:16:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4910E14374A; Thu, 13 Jun 2024 20:15:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="s6UXzttw" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 DB34213B2AC; Thu, 13 Jun 2024 20:15:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718309740; cv=none; b=rYOGYx/eZHisVEN6NKRxS5IvqAcAjCvsHMiJGWDywiOnoQBiVfqeuteB/+NSwZ9t08rAaw4ONU7R8kG7Lax+8rj00h0Am6FQ/IpPlfAl2kI4EA41ozkBafHUO+qx6uk9IeOdVK1IOL01yet9IXulLJ7ARruJdHRcwNQkKSTQy28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718309740; c=relaxed/simple; bh=uz3G8XwtTUx7pGyHKuMJTv6ZsMZ4E3FM8B10yoRcG+E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lmWekFVfQAPtbjteqbk0mR777JZYCnlauPOumIDAcUOEitOjEVcAKQmT/BHqn0cWA4OoDff9g0vhlb1Ky6bdHl+MOZKyv/kBuXLmTmojOiQPbKziLuoeQodzO7FWnh8lzmJxOUKmlCnKdhgz+htNQQCzyIiLFxGvvNy45UOLOB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=s6UXzttw; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1718309732; bh=uz3G8XwtTUx7pGyHKuMJTv6ZsMZ4E3FM8B10yoRcG+E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=s6UXzttwVWIX3YF/8qTQzMhi4Of/9wP5SpKKBIvpDYcC529qGm6PpxXuTg23mfzRI Y+5pEBsmKJF96OJdOKY3uovY72jyXLKaC50MF/z7zfFMp8tK/P9ARNGvr9gm0W+anF aAuQl2T2E0KbTB+QlPFUDpW9yhx7lIYP+DvPfpqE= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 13 Jun 2024 22:15:36 +0200 Subject: [PATCH 5/5] ACPI: sysfs: remove return value of acpi_device_setup_files() 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 Message-Id: <20240613-acpi-sysfs-groups-v1-5-665e0deb052a@weissschuh.net> References: <20240613-acpi-sysfs-groups-v1-0-665e0deb052a@weissschuh.net> In-Reply-To: <20240613-acpi-sysfs-groups-v1-0-665e0deb052a@weissschuh.net> To: "Rafael J. Wysocki" , Len Brown , Robert Moore Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718309732; l=2134; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=uz3G8XwtTUx7pGyHKuMJTv6ZsMZ4E3FM8B10yoRcG+E=; b=2cu/wdwm0qQfux6dwms8j3LcvJ8gZoJhkLB9ueU/8vGNsIVx3IQACCQxdNND4BTZmwPDWhzpx vvds8e2vZ1gD8qGfBYEn7FlQS6upf7abphkvk4/BG0HvVeFCoYzQig7 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The function can not fail anymore, so drop its return value. Signed-off-by: Thomas Weißschuh --- drivers/acpi/device_sysfs.c | 6 +----- drivers/acpi/internal.h | 2 +- drivers/acpi/scan.c | 5 +---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index f1e8928254c2..c85ec754931c 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -619,14 +619,10 @@ static const char *devm_acpi_device_str(struct acpi_device *dev) * acpi_device_setup_files - Create sysfs attributes of an ACPI device. * @dev: ACPI device object. */ -int acpi_device_setup_files(struct acpi_device *dev) +void acpi_device_setup_files(struct acpi_device *dev) { - int result = 0; - dev->pnp.str = devm_acpi_device_str(dev); acpi_expose_nondev_subnodes(&dev->dev.kobj, &dev->data); - - return result; } /** diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 63dd78d80508..e71fecbf731c 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -118,7 +118,7 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle, int type, void (*release)(struct device *)); int acpi_tie_acpi_dev(struct acpi_device *adev); int acpi_device_add(struct acpi_device *device); -int acpi_device_setup_files(struct acpi_device *dev); +void acpi_device_setup_files(struct acpi_device *dev); void acpi_device_remove_files(struct acpi_device *dev); extern const struct attribute_group *acpi_groups[]; void acpi_device_add_finalize(struct acpi_device *device); diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index c15fffefca0a..49a8172fe0de 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -766,10 +766,7 @@ int acpi_device_add(struct acpi_device *device) goto err; } - result = acpi_device_setup_files(device); - if (result) - pr_err("Error creating sysfs interface for device %s\n", - dev_name(&device->dev)); + acpi_device_setup_files(device); return 0; -- 2.45.2