Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4232710ybb; Tue, 7 Apr 2020 03:29:42 -0700 (PDT) X-Google-Smtp-Source: APiQypKZ4Z8+3c0rKEZTS7ofGtwzWeY65tZ0xwlMJRUQLTtK2meOFZHyDypwo1vJCJsqcjWYxASI X-Received: by 2002:aca:4fcc:: with SMTP id d195mr1149619oib.99.1586255382469; Tue, 07 Apr 2020 03:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586255382; cv=none; d=google.com; s=arc-20160816; b=NsSc/Pla65VUV+1G0vs9UIF2AgU32nTayn0dK3WYM47XpO+6Gsmg5rTLC/+5khO8L5 9YLLpu3OKw0IVq20d/+lKW7EbLAXn0pxQbsGuMiTtWAp3BT1R8RsAiy3SclzcYpjtODQ eul0lTXrN41lb2QIu0TTd3g6PKoZa1Bnz9oLBHAESUfz07WcprDcSUwCjFkF4djK3I5p W97C3vFJZbxBEiExNurppF/kVNrdmLu3vKDREUw39bxJ59C9RRZi2BprcIAIrtD5P2d1 gORD5TOddSxaFI9Y0GAKJA502yFAyt7PhfHqiuM3rGVCMxTVAcSrfnq4OSfQ1tG2Y6PZ N3vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Yesv1JfLUCmj9S2X1giu3j1hreqIfQwG8Gj6IflKnuA=; b=LlhpNsZ3NvNGfgSAcui8hJnd5Gxwx6FDdUnvZcatGLNYeORNwatti/DYJ9qFAZboVm Umrfdv2oC5F5WPtUSRWrK8BBnjkiq7J3XgQEWwdFJ/w+zi1FC3Zk3sdV2pHuNo6jwm0J 78gssxCJ8SQSshNwexnhQn9G5s+zkR5Y6SObXyL7fEGJM06C1RW5/OeYXSPLUJorRnGz V4jjiW2HOm0iVk13G/tC0qaqjVLbV4b78sZMTGZ4dFOoG6RivDWGFJvNhig5k+E0NENv 228/he33KcHs0zGbgeAvxK+YpwQxtjUO/dDFhDxoKWpK2Qz9/MWWEoXyiGjbGRjc1AVI at5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vofYaROW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si466263oie.153.2020.04.07.03.29.30; Tue, 07 Apr 2020 03:29:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vofYaROW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728806AbgDGKYt (ORCPT + 99 others); Tue, 7 Apr 2020 06:24:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:35140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728794AbgDGKYs (ORCPT ); Tue, 7 Apr 2020 06:24:48 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 177B620644; Tue, 7 Apr 2020 10:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586255087; bh=xmrT11w54ApBz4oohIkiyxhRNgVs9VCTrvI+89Llllc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vofYaROWb4ihJ2e7KbU91cY0MGYvnbFWQvxSMnXmakhDhFBzzrAfgGywz8GHu4ZVh DyX06QxuuDsvJfwFXtwqWgohjTl36NiKt6xDcZ5OMhUHV2dftIxT0Rx388ETCBKtFu WdtsKNIL8nL8RZudOOy9ZANiIto34KTO8u13aIJ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kelsey Skunberg , Bjorn Helgaas Subject: [PATCH 5.5 24/46] PCI: sysfs: Revert "rescan" file renames Date: Tue, 7 Apr 2020 12:21:55 +0200 Message-Id: <20200407101502.114243463@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200407101459.502593074@linuxfoundation.org> References: <20200407101459.502593074@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kelsey Skunberg commit bd641fd8303a371e789e924291086268256766b0 upstream. We changed these sysfs filenames: .../pci_bus//rescan -> .../pci_bus//bus_rescan ...//rescan -> ...//dev_rescan and Ruslan reported [1] that this broke a userspace application. Revert these name changes so both files are named "rescan" again. Note that we have to use __ATTR() to assign custom C symbols, i.e., "struct device_attribute ". [1] https://lore.kernel.org/r/CAB=otbSYozS-ZfxB0nCiNnxcbqxwrHOSYxJJtDKa63KzXbXgpw@mail.gmail.com [bhelgaas: commit log, use __ATTR() both places so we don't have to rename the attributes] Fixes: 8bdfa145f582 ("PCI: sysfs: Define device attributes with DEVICE_ATTR*()") Fixes: 4e2b79436e4f ("PCI: sysfs: Change DEVICE_ATTR() to DEVICE_ATTR_WO()") Link: https://lore.kernel.org/r/20200325151708.32612-1-skunberg.kelsey@gmail.com Signed-off-by: Kelsey Skunberg Signed-off-by: Bjorn Helgaas Reviewed-by: Greg Kroah-Hartman Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Greg Kroah-Hartman --- drivers/pci/pci-sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -464,7 +464,8 @@ static ssize_t dev_rescan_store(struct d } return count; } -static DEVICE_ATTR_WO(dev_rescan); +static struct device_attribute dev_attr_dev_rescan = __ATTR(rescan, 0200, NULL, + dev_rescan_store); static ssize_t remove_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) @@ -501,7 +502,8 @@ static ssize_t bus_rescan_store(struct d } return count; } -static DEVICE_ATTR_WO(bus_rescan); +static struct device_attribute dev_attr_bus_rescan = __ATTR(rescan, 0200, NULL, + bus_rescan_store); #if defined(CONFIG_PM) && defined(CONFIG_ACPI) static ssize_t d3cold_allowed_store(struct device *dev,