Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1251408rwb; Fri, 7 Oct 2022 09:59:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7x/oE+f1dWSMTHpfhbJgY9tdS8E7dqDqcFMhH/R7TJEu6inCyS3TR7CrA+QXoYtoE8XCK8 X-Received: by 2002:a17:902:8493:b0:180:172c:b89d with SMTP id c19-20020a170902849300b00180172cb89dmr3214629plo.68.1665161998386; Fri, 07 Oct 2022 09:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665161998; cv=none; d=google.com; s=arc-20160816; b=eL+sJTnOVmorMZWocQlZs8tR0jYQngksJSCwNF5oBeyevJ5o0jvzzzyASHlqZ1FKrF Z6tCqK2CxXp7sOCO70PLPc0kFzN31vc/fLiU8txk8qWA8DxamSFcxpIOAms9pdYMskZ2 Z/EBzEVDK4zPmttCy9AzfzrttQHkhozjnY8HH3xqI11XdVCYbOs/jjeBpgPNB7pmB/du xNEV6D5k00lTOlX9w1bVl++qIgtQpCPR7kAYsW/YR9P4b7lVGaGffAMdzF7i76GT7gX3 mFoqzZNRBF2oFo1MSU7IauX6l2AJsvdmEzoSK5CA3qwNaDVHKqJjZ0MkDgalI/4Xroif ploQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=ztA8X0oCOrzYe4bRM5wcVboplj1CUUEIc1ilkn7aa30=; b=ymdvS5eB4yW/KUbw3BtYrs7swMvCNZJQykNi3gq4BeUQcRqtSp5jXBxytJnRVqViCX b+QdrHRKb8ICGPAhW2hD5A5THPoPTKy9bAHBxfdOu8HIw+n736Uy9RxNsEUz5Bp24uUv ghm5gz5nHQPPKv+EuLsD18wd1VC2FOY5FJhg2Nc+OFFlMlIr3QvXADWPIexDxKqpCFIb 6FzPR0W5W4cQ9zjp6vBNuNUGdHZt8p8ugNvUabab15HwFggtXD8Jy8Fmm75ViFsGEGaQ pQmNZCf2i7p1K4v1sECkJ7LlJ7dsrUBF54wWY455D1hbj1Cxygu7HPDbXQ3909pyszo4 6VNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b=qFKLdf9E; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ViORmYvI; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a170902f78a00b00179f1470b55si2659418pln.419.2022.10.07.09.59.45; Fri, 07 Oct 2022 09:59:58 -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=@kroah.com header.s=fm3 header.b=qFKLdf9E; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ViORmYvI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230116AbiJGQng (ORCPT + 99 others); Fri, 7 Oct 2022 12:43:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbiJGQnU (ORCPT ); Fri, 7 Oct 2022 12:43:20 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA0608F26B; Fri, 7 Oct 2022 09:43:17 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 72D7C3200413; Fri, 7 Oct 2022 12:43:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 07 Oct 2022 12:43:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1665160995; x= 1665247395; bh=ztA8X0oCOrzYe4bRM5wcVboplj1CUUEIc1ilkn7aa30=; b=q FKLdf9EkUFedxcq0I8GMRLbiWqr6NZQZMGydORi7Kxsl3CqTUS/EjjN9Xh0NrbNK +NMDRdSZIVBmKoVd4EUhYiBPy8CFx2ArnKFSawz5/mNw/o7t0NZt8YdKzX1FPSZ9 XoACLMW9kHSmBH7RBRqEbrTHLTERGlwxXMBFIwmsf5cMv/gF1wbLNdqXT3QCWXAA wcuhZtRxilf6WNmv2J4gDJAXPVZiGVW+Hb1EtlzVvrCVw29qO+944jLstNlWNdU4 zT6J3Hy1k4S+DgDQHpG8NwdnurTBV9AbbCQSF3RrFBm8+HLIedUQEab+5RWc1JyV C6En08tpCZxwX0IPjvceg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1665160995; x= 1665247395; bh=ztA8X0oCOrzYe4bRM5wcVboplj1CUUEIc1ilkn7aa30=; b=V iORmYvI9BZfPe8CCIIT79BNszLMcZOEu8k5emi66xDB2mXe1SiUL4fYcl2u77Uq7 KJQE8U0DHZu1AvhCVOxQGlnqA1S/1r6rsb6/jCuNrBRq2dtjpQBeLxt9NscAeFVG j/Wtfy2+QBYUgKmy8TEdiTHaVA3eF2+6moDmbi4HeTjRgRvCycStZPQURPYjsi2/ 3h1dm9GXa2J01SVcCTgCzHUuwnvXHY9cRN4Mqzt0CxwPOA2c9uQ+3z3DyfLycKpB z66utldH6N8O7jjbDH06go6fzVDezOiqGJeJHsG4tirJAlwr0X1nkwU2Kk8HKYRI H92LOs1gO80mq2FwQsQxw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeijedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtjeenucfhrhhomhepifhr vghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepgf ekffeifeeiveekleetjedvtedvtdeludfgvdfhteejjeeiudeltdefffefvdeinecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrh horghhrdgtohhm X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Oct 2022 12:43:14 -0400 (EDT) Date: Fri, 7 Oct 2022 18:43:56 +0200 From: Greg KH To: Jiaxun Yang Cc: "linux-mips@vger.kernel.org" , linux-kernel@vger.kernel.org, Thomas Bogendoerfer , linux-api@vger.kernel.org, f.fainelli@gmail.com Subject: Re: [PATCH v5] MIPS: Expose prid and globalnumber to sysfs Message-ID: References: <20221007141207.30635-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 Fri, Oct 07, 2022 at 05:37:34PM +0100, Jiaxun Yang wrote: > > > 在2022年10月7日十月 下午3:52,Greg KH写道: > [...] > >> + > >> +static int cpuregs_cpu_offline(unsigned int cpu) > >> +{ > >> + struct device *dev; > >> + struct cpureg *reg = per_cpu(cpuregs, cpu); > >> + > >> + dev = get_cpu_device(cpu); > >> + if (!dev || !reg) > >> + return -ENODEV; > >> + if (reg->kobj.parent) { > > > > Why are you looking at the parent of a kobject? Why not just always > > remove the kobject if you have a reference to it now? How does the > > parent matter? > > Another dummy copy from Arm64 code... kobject_put should be enough here? Why would it not be enough?