Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1289869ybb; Sun, 29 Mar 2020 00:36:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu/fst5XlenKXd6wLwCONCgeBNmGQPZWSFEAWxd5GeiFztIeuELdZL7rWq36Q/zy+UuhSoP X-Received: by 2002:aca:cd0e:: with SMTP id d14mr3888717oig.167.1585467400889; Sun, 29 Mar 2020 00:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585467400; cv=none; d=google.com; s=arc-20160816; b=rC4ODp2tWhLL2ofA0J/lAj4DzwA6hQDq0+4405txeeE/YAhHVjiUbgaZdsbFtQToj3 H7JP8mjWMNpagAzZrCIejnLEDeO1NGPwYOX6tchccVB6WHu7s3DslubNQnCTNgLYvYOD VOPQxCqhKpQUI2w/KTipubWIMlKySUiv5bI7CxSz9+NHFXuNJNFb5QybxkXcHLsdCbmZ 8NxM188j3TEKMYpRI4+6G3VcKbSZEo9D/MRlRT7e2tTB2zl57ZjjuwVRlXHq1QPX7Fdx QQgVQ6E/qizVMdv1XzY/rwyi6Nh+FTk3VWmMWaShB/QcvjrpVr2i4KT8iFJg6HHDz9+n PilA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=BSHqJR12su4S6d2AR5XptJQ8Bmuut28ZrTIT48+IVas=; b=TZMMHgLNwy2YpV3HLcZsWs8NPpoZXyfZ2aVOdWJxmY3SG/LNrkBdZkmithMCTmbNe+ DSQUnjol3rOpiyt9xeIXlZEB2J6G2JdiOPILPcommJCD1X4SOBxPzZ4097UzURreZPG6 FMfmTbmi7YyI8h52DEBJZiN3QCzrUoBRcG6bdAQ9pcUTWVvC2GzV+46/KbLr1ZETc9BC 80IeRPRkfUbjn7EAhd5ibwSQ57ja1iNHsSeR7aYXKJBwTI+eiGE9ZtL25OwIOCVQ8I33 Z4F8omRxgEemheEf0Sit90mQl8r1YLKHFsn+gh4+pDkBE/OLNGpMarxKQHY+d10I90st Qykg== ARC-Authentication-Results: i=1; mx.google.com; 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 f128si4431780oig.208.2020.03.29.00.36.17; Sun, 29 Mar 2020 00:36:40 -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; 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 S1727336AbgC2HdJ (ORCPT + 99 others); Sun, 29 Mar 2020 03:33:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:50990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726391AbgC2HdJ (ORCPT ); Sun, 29 Mar 2020 03:33:09 -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 0FA18206E6; Sun, 29 Mar 2020 07:33:08 +0000 (UTC) Date: Sun, 29 Mar 2020 09:33:04 +0200 From: Greg KH To: Bjorn Helgaas Cc: Kelsey Skunberg , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Kelsey Skunberg , rbilovol@cisco.com, stable , ddutile@redhat.com, ruslan.bilovol@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, bodong@mellanox.com Subject: Re: [Linux-kernel-mentees] [PATCH v2] PCI: sysfs: Change bus_rescan and dev_rescan to rescan Message-ID: <20200329073304.GA3911175@kroah.com> References: <20200326063524.GA922107@kroah.com> <20200328200633.GA102137@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200328200633.GA102137@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 28, 2020 at 03:06:33PM -0500, Bjorn Helgaas wrote: > On Thu, Mar 26, 2020 at 07:35:24AM +0100, Greg KH wrote: > > On Wed, Mar 25, 2020 at 05:10:33PM -0500, Bjorn Helgaas wrote: > > > -static DEVICE_ATTR_WO(dev_rescan); > > > +static struct device_attribute dev_attr_dev_rescan = __ATTR(rescan, 0200, NULL, > > > + dev_rescan_store); > > > > Oops, this should just be DEVICE_ATTR(), no need for __ATTR() as this > > isn't a kobject-only file. > > > > So how about: > > > > static DEVICE_ATTR(rescan, 0200, NULL, dev_rescan_store); > > I don' think DEVICE_ATTR() works in this case because it uses the > first argument ("rescan") to build both the C symbol for the > device_attribute struct and the sysfs filename. > > There are two instances in this file. The two sysfs "rescan" files > are not a problem, but the two "dev_attr_rescan_name" C symbols *are*. > We could resolve that by putting the bus attributes in a different > source file than the dev attributes, but it doesn't seem worth it now. > > I tentatively have the patch below on pci/misc. I dropped the > tested-by and reviewed-by because I didn't want to put words in your > mouths :) Ah, yeah, you are right __ATTR() is what you need to use here. Your patch looks good: Reviewed-by: Greg Kroah-Hartman