Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp662346pxb; Wed, 3 Feb 2021 14:36:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8k56T8LfX+f+v+U3vv4UTf5UsdNTJSwmKztV9b1Z11VQZza9bucegxT0XeCjgwaaS/1iQ X-Received: by 2002:a17:906:8611:: with SMTP id o17mr5370942ejx.145.1612391783181; Wed, 03 Feb 2021 14:36:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612391783; cv=none; d=google.com; s=arc-20160816; b=pnwDHPXR63/0Z9oRuDh4epg8u2SBGMTSLhl2sflEZuQyUFKsXioMLmZEJg/LUKbnPL vCNOXdUrb3/PF9T8f5c6ce13dYkeJp3PzFB2ZLdjR+X6cxDMQ2KjPgaMFTSEpPnEhH9o 8ZPvYzspvZAhxZWMYCU7AeU1+rYFbViuE6kVF2QuXzT3CUwd/XCfjkoJNtEd9lWFINmI SnOfYOHE4LKmcoHgc8ScM3TzhGrj30ZLbU2nMqlLlbEGyEBZwup0VXHXtTvdXWAo8vGn DuDOxNSAs9P7TS2h8qYU+6hrZQYQNPd70wIwqO5jTQWVaNHBsZZkTWH/GxQJHfuPCDBA eMUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xmuBceLfN6+2fSpMZqxOJeHY+Aw2paS3CwMcgD9ayVA=; b=rtuxlZ05qrMWFPVHceliCn6zMSBOYPzWxKSYnYgaODUODnPO0cEys3XKR8lQ9O9Bw+ 6RLmS1hym2IUdPbPcc2KvU+0HYplubMZ6vdJ2+VPIU12+aqpeG4fW2jdgFD87Yjhemqw xQGP/MF+4a0av6gbg/nuLXapIh3dMThoI6Wd2WPN/nkGkQ/r5Un72j0hlA4qHDhqr6rA 1pqlt4qGEW+XXdOVijHJZbvGpewdRSQuYHqyN4BphJIn4gJrJk3H8mEbBDNchwFwJBCW ATUnWnmZmWKVIVLqcwHWqbETZ/XvXs5ZfCAUEzudGvVi3PBfsn7unWwioavJdhIEOZ14 NgEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CytkYwap; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si2219045ejd.309.2021.02.03.14.35.58; Wed, 03 Feb 2021 14:36:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CytkYwap; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232491AbhBCWeQ (ORCPT + 99 others); Wed, 3 Feb 2021 17:34:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:59012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232679AbhBCWeE (ORCPT ); Wed, 3 Feb 2021 17:34:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BDF9164F60; Wed, 3 Feb 2021 22:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612391603; bh=SU93X/dLj/O4dxzL3tZabdkks0gkHS7Hl/zs63xxgoM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CytkYwap+IhyrXIUEDb8dD+v96QlEtYPxdQBuKIJziszhiAFt6Gn7qFSKDSYRatxZ PLYzHpuHA4OgBZshJ1bU2yqbDkUnM7DKvbibTZrvynkt3I4CMKC3RU1eCchwYGzCgw CgimbjuNBn+CB3bjX7CXgjbMT4aD8F13FVDD7fj8= Date: Wed, 3 Feb 2021 23:33:21 +0100 From: Greg Kroah-Hartman To: Gustavo Pimentel Cc: linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Andrew Morton , Jonathan Corbet Subject: Re: [RESEND v4 1/6] misc: Add Synopsys DesignWare xData IP driver Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 11:12:46PM +0100, Gustavo Pimentel wrote: > + /* Sysfs */ > + err = sysfs_create_group(&pdev->dev.kobj, &xdata_attr_group); > + if (err) > + return err; > + > + err = sysfs_create_link(kernel_kobj, &pdev->dev.kobj, > + DW_XDATA_DRIVER_NAME); > + if (err) > + return err; Huge hint, if you EVER call sysfs_* in a driver, you are doing something wrong. You just raced userspace and lost, use the default attribute group for your driver so that the driver core can automatically create the needed sysfs files. And drop the symlink, that's just crazy, never do that, I don't think it's doing what you think it is doing, not to mention you did not document it... thanks, greg k-h