Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp291710imn; Wed, 27 Jul 2022 06:28:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sGsNGv+C/qkexGbAz+vpJyZ4J2vWjjcN+qowW1OBTLJqpjCV9peBDfIOYScu6/BFjlSMet X-Received: by 2002:a17:906:8479:b0:72b:83cf:4cf3 with SMTP id hx25-20020a170906847900b0072b83cf4cf3mr17405931ejc.90.1658928488851; Wed, 27 Jul 2022 06:28:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658928488; cv=none; d=google.com; s=arc-20160816; b=hYp42KeBwjUMQbgWTmV0y0AQuy/ZKF7ym1+gkG89I5OSFD57+q2NBTHaK8i+7nn4ay W72xenlzsPqD4N1PMZp+BbDP+1JDrbbjckhqRCyShhkfqIsRJABak8sEBYtG01bkgzcD KNd15wOZwShIMah4wv1Ls+jNDPPgsPshTvO+FrkmQAx2NX8I3E9f+l6/dmgS5Sm5Cyhf dAQ09A7jDK+49Z/uczXrRZTTTDZqNRMp5HlwwJ8qb/C5jkc36gjcWFMF/NnLd2Rw5/D2 JxoRAGf2AXui5eD0Xtc4zC08ofAAGC/USj++oG+K076PlyGspRvxecYyny45szti7jSC bwyA== 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=Sov+gANYE2yvyDUBiC++3/G7VbjzomogySq1Uu7wQgg=; b=x1aeTxrKAYh9SfhvxUW2qYcuwn4YjoD4LQ5pgO4jF0pIaKWl1sr/cMUWFPopvYS0NW UAqwACirJE/p/BF1dU/3oM44WedzZhjCG5gjsrcyiR03zo2nMmOwJQvYGUSJW0ZLJyLn FXoqqFlz9lIxYlU6MyPmBwxsdTBSy37xAZIzp+mbGZ/5tBSCfWaeP9FVZm8maJdvOYeI p6Rbqqyo3rKbyexlUgC9j9H3vKtoycv2u/p2iuRQ52zA1FCeQp7ZQwdlMmqjJiOvC7kQ gI8iMuJ0SE6DWn/dK23ALQMu3iMdoEiLyhsUTu+kNmOYs/0zq4gGOmEU4myoJzWlPllk xecg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Dx8kZcSz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f25-20020a056402329900b00437d9388cd4si18529976eda.275.2022.07.27.06.27.43; Wed, 27 Jul 2022 06:28:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Dx8kZcSz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233328AbiG0NZZ (ORCPT + 99 others); Wed, 27 Jul 2022 09:25:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbiG0NZX (ORCPT ); Wed, 27 Jul 2022 09:25:23 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9812FAE78 for ; Wed, 27 Jul 2022 06:25:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 043FCCE219F for ; Wed, 27 Jul 2022 13:25:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF7F7C433D6; Wed, 27 Jul 2022 13:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658928319; bh=/2rotFYdfY/ec+jauYH6arvwpgfHHTF23YN5wkahDZY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dx8kZcSzWA0zU1+8BV8WNlSpXSXZjd6fZMfb85LnVL7iRWMiN+KGmqOpnFTkJ5ltE X/056Dd9glRr2gRTDtznYZwjl5GEoK1ZURWaY4nApcioBJlDvriOeqio6tRn+dLA6y gysplP8WEl8YRGj3RmD1POBA5J4lb8jzJHOjATC0= Date: Wed, 27 Jul 2022 15:25:16 +0200 From: Greg KH To: Jiho Chu Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, yelini.jeong@samsung.com, myungjoo.ham@samsung.com Subject: Re: [PATCH 5/9] trinity: Add sysfs debugfs module Message-ID: References: <20220725065308.2457024-1-jiho.chu@samsung.com> <20220725065308.2457024-6-jiho.chu@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220725065308.2457024-6-jiho.chu@samsung.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 25, 2022 at 03:53:04PM +0900, Jiho Chu wrote: > This patch includes debugfs and sysfs interfaces. debugfs and sysfs are two totally different things, with different rules and requirements. Split this up into at least 2 different patches and don't mush them all together. Would you want to try to review 2000+ lines of this type of thing that does two totally different things at the same time? Also, you forgot the sysfs Documentation/ABI/ entries, which are required as you know. And finally, you should never do this: > +int trinity_sysfs_init(struct trinity_driver *drv) > +{ > + struct device *dev = drv_to_dev_ptr(drv); > + int err; > + > + err = sysfs_create_groups(&dev->kobj, trinity_attrs_groups); You just raced with userspace and lost. Use the default groups pointer for your driver and all will be fine. Makes for much smaller code that works properly. thanks, greg k-h