Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp554652imn; Thu, 28 Jul 2022 08:44:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t16wASF4ntlFZR9QuLJzd5QFhTraunBRHvMSht2hDe5hw9Yjk0YYTOV5ByxZa32lJw1W+B X-Received: by 2002:a17:907:6d01:b0:72f:53f:7a25 with SMTP id sa1-20020a1709076d0100b0072f053f7a25mr21149548ejc.126.1659023094990; Thu, 28 Jul 2022 08:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659023094; cv=none; d=google.com; s=arc-20160816; b=I1BUqN0if6c6mfCsFkfTorcUKkSsR2Kamk3lQF+q7Z5sDf5IGawGa7SwEygRL7ZBSA avzDRrJiXjDU09E2C1oQJ42Yy8CwUuh3P7Ga2yvjR6MoUwRSh2OVIKWxZ2ZTfqtGEZ2k fIlHdo4VgI2X687Ldj5IahSrqNPp5VcmRpzwWR4dnkfrLVal9cyTSqIyqVeA3h8k+9uu hflnbCQAE7eF2FSzYHRVvhPOKUeboHRPPj6Z46fDHpDFXZJ7eLa0jBGF/r8IHCfU6Z8Y kzllWqZpoPwGtRQCtRTa2kUsRrPgeeXCkSahF0nTcLOWo2t5iUjBoGMilZU9QdE+Hc0Z yJuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kURcb4Uppj48pfl83KChzaSFYGP51XF6dGXiyP1v9RI=; b=v2LqySSVRQaxnrJXOxtWe3GI0R3ms2AsxEY8bLdej+aQ4EfA+WRWKaVICMzn5aUFfW WTuuQrqH0OMc/R0nEoy9X7TdmWd0PE09Jda3lV72ZtEhAIHzxnnOIY0FkiadFURCJBO3 9dUo1/fqVC29TroQ1Jk6zxE3EpPRys/Xb7UkWiJdzRizeKF35jswcdgaOgRTedm8ixYK XtabZ/CpGbNMeP0nBa/AsNLCl+iRxGUPmzA10RPnxtNbcuE+fsXe0NA6OnkwWK2Ft/se PClj5wfevFIprzYRYrY/mpTjOaiGiHZTdqsRsSzV5b4nSMQE+NFx2H+wOmXKsn7qZKuM JEUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fjP9B3OS; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a5099c6000000b0043bb69a32d6si128577edb.561.2022.07.28.08.44.30; Thu, 28 Jul 2022 08:44:54 -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=@intel.com header.s=Intel header.b=fjP9B3OS; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231676AbiG1Phm (ORCPT + 99 others); Thu, 28 Jul 2022 11:37:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231598AbiG1Phk (ORCPT ); Thu, 28 Jul 2022 11:37:40 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33ADA56B81 for ; Thu, 28 Jul 2022 08:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659022660; x=1690558660; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=uMQQhSgBy0QjPsC+CGQ9eOoRHsp9u4FCCDd+xJaVmTc=; b=fjP9B3OSKzYUYQXf8Z/46Lqp4kRf0PH27H8LAiZwioODMyDGCFd7x8fI 9mJKcIquokjWllu2M4hAprTBFICxhKP3keRVVm/jJDKzJRr1pPKaVaG/9 G051h1Fq1JuToEFIhGtKYQJ7b9GPaUsWwwuz4T34mR0ElbBC5p5eTcDlZ 4IPtsPjUZMltI/JjOxvJAeIVvI/BKdugRe960WQtVh+uf7yTtcBaK1RAz S6wtuY53poua6EVG4Le7RUFE07pLlipGB57HMChKgqZXEVwHpZ7c0TLAy /69u0DVOqM83axq8h+B+N4Fdxyz3OnV/yo8iZkkfddPIiyrgmwQIvizdP w==; X-IronPort-AV: E=McAfee;i="6400,9594,10422"; a="286091942" X-IronPort-AV: E=Sophos;i="5.93,198,1654585200"; d="scan'208";a="286091942" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2022 08:37:39 -0700 X-IronPort-AV: E=Sophos;i="5.93,198,1654585200"; d="scan'208";a="633741699" Received: from tesmoryn-mobl.amr.corp.intel.com (HELO [10.212.62.40]) ([10.212.62.40]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2022 08:37:38 -0700 Message-ID: Date: Thu, 28 Jul 2022 10:37:37 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: [PATCH v2 1/3] drivers: misc: intel_sysid: Add sysid from arch to drivers Content-Language: en-US To: Greg KH , kah.jing.lee@intel.com Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, rafael.j.wysocki@intel.com, tien.sung.ang@intel.com, dinh.nguyen@intel.com, Zhou@kroah.com, Furong , Vinod Koul , Bard Liao References: <20220721123017.416438-1-kah.jing.lee@intel.com> <20220721123149.416618-1-kah.jing.lee@intel.com> From: Pierre-Louis Bossart In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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 Thanks for the review Greg, >> +static int intel_sysid_probe(struct platform_device *pdev) >> +{ >> + struct intel_sysid *sysid; >> + struct resource *regs; >> + >> + sysid = devm_kzalloc(&pdev->dev, sizeof(struct intel_sysid), >> + GFP_KERNEL); >> + if (!sysid) >> + return -ENOMEM; >> + >> + regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> + if (!regs) >> + return -ENXIO; >> + >> + sysid->regs = devm_ioremap_resource(&pdev->dev, regs); >> + if (IS_ERR(sysid->regs)) >> + return PTR_ERR(sysid->regs); >> + >> + platform_set_drvdata(pdev, sysid); >> + >> + return devm_device_add_group(&pdev->dev, &intel_sysid_attr_group); > > You just raced with userspace and lost. Please use the default group > for the platform device. > > I need to go remove this function, it should not be used at all as it is > broken. Can you elaborate on the issue and suggested replacement? We used this function for the SoundWire sysfs based on your review comments (2 years ago?) that we should not muck with kobj, and that function devm_device_add_group() is also used in a probe function. Thanks! -Pierre