Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5338558ybl; Tue, 14 Jan 2020 07:21:32 -0800 (PST) X-Google-Smtp-Source: APXvYqyVjKis2HcQpHY5SOZQyfFrgp7QGhPL/NPma6G3YCxSA2mapwLC7fVRBTg9JJtqF6BRMY25 X-Received: by 2002:a05:6808:aac:: with SMTP id r12mr17441896oij.59.1579015292656; Tue, 14 Jan 2020 07:21:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579015292; cv=none; d=google.com; s=arc-20160816; b=yFyHy+CsylvBTfIZkyMU3wbtMCZkWP4cJ4YNf11lMtHgieC2hL0MODK3V7D/9lMl8s rBF+9RNmb/t9stlVvPgpsPpRRXNv34SFYYhNpcOLYlreVcg87zxh6HfQktGHuMi8SRnm twz+rbI3p2XS64xFhjjcIKEJedxPgJ/Bzx5R3x279IXzkHPmRFGuuebVbsmqFh2hH/ET Pm3BT8+fxF++dnGmoR3mNMgxUQvkk1n+pAYpDSTNldCGdYlRR1UuuqkTq7OE2WiTJ5RQ eElJw29A24pLufeZwffTZCacsCK0xTNur2gV3ll7ZKmLcPckwwB2j2Rc0FyELnzRF5hE HdFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=WgaLTsDPbW877kTJQHeC+/2eQi8UD29o9l0xQNyXu2I=; b=lyEalQsTYMqogHxZ9eNWsYlYDg7o0XEujS5MlB/ZM0O5BJRBkrj8EGKeOUZdGMAVeT b6W0MXaKeK3yG1N4PKDTs6nh2pzXlBBuMFL/5wcnbDVO8cHDI9f5xqZ2y+pryqd3LV+i mLWavduiTjtufMJBbaoI7v9vdnHNMPxROE36tLuLV3Hh9qLypaGYX9/Vz+M0L7RglCXs LXMoCN7qNdftdAoRYExxBgTQanGwN/eUKwjqfJ8LRIHkNauRijig4XiWHtnNrCsnl2PK uzjM2DLJUsUzvN6BWuR08bGZRcqnh4E0jl9TGEUeisLe5LGqfV0aBj9CdXaTsgss0LpN EvJQ== 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 j16si8862388otr.190.2020.01.14.07.21.21; Tue, 14 Jan 2020 07:21:32 -0800 (PST) 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 S1729028AbgANPUQ (ORCPT + 99 others); Tue, 14 Jan 2020 10:20:16 -0500 Received: from lhrrgout.huawei.com ([185.176.76.210]:2268 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725904AbgANPUQ (ORCPT ); Tue, 14 Jan 2020 10:20:16 -0500 Received: from LHREML714-CAH.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 8459F38DF2C7F76447CD; Tue, 14 Jan 2020 15:20:14 +0000 (GMT) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by LHREML714-CAH.china.huawei.com (10.201.108.37) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 14 Jan 2020 15:20:14 +0000 Received: from [127.0.0.1] (10.202.226.43) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 14 Jan 2020 15:20:13 +0000 Subject: Re: [PATCH v1] driver core: Use list_del_init to replace list_del at device_links_purge() To: Greg KH , James Bottomley CC: "Martin K . Petersen" , "linux-scsi@vger.kernel.org" , Linuxarm , "linux-kernel@vger.kernel.org" , "saravanak@google.com" , Arnd Bergmann References: <1578483244-50723-1-git-send-email-luojiaxing@huawei.com> <20200108122658.GA2365903@kroah.com> <73252c08-ac46-5d0d-23ec-16c209bd9b9a@huawei.com> <1578498695.3260.5.camel@linux.ibm.com> <20200108155700.GA2459586@kroah.com> <1578499287.3260.7.camel@linux.ibm.com> <4b185c9f-7fa2-349d-9f72-3c787ac30377@huawei.com> <3826a83d-a220-2f7d-59f6-efe8a4b995d7@huawei.com> <1578531860.3852.7.camel@linux.ibm.com> <20200114150739.GA1975985@kroah.com> From: John Garry Message-ID: <6820e1c4-07ab-0748-0bf3-e1c25c524a40@huawei.com> Date: Tue, 14 Jan 2020 15:20:12 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20200114150739.GA1975985@kroah.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.43] X-ClientProxiedBy: lhreml729-chm.china.huawei.com (10.201.108.80) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/01/2020 15:07, Greg KH wrote: > On Wed, Jan 08, 2020 at 05:04:20PM -0800, James Bottomley wrote: >> On Wed, 2020-01-08 at 17:10 +0000, John Garry wrote: >>> On 08/01/2020 16:08, John Garry wrote: >>>> On 08/01/2020 16:01, James Bottomley wrote: >>>>>>>> cdev->dev = NULL; >>>>>>>> return device_add(&cdev->cdev); >>>>>>>> } >>>>>>>> } >>>>>>>> return -ENODEV; >>>>>>>> } >>>>>>> >>>>>>> The design of the code is simply to remove the link to the >>>>>>> inserted device which has been removed. >>>>>>> >>>>>>> I*think* this means the calls to device_del and device_add >>>>>>> are unnecessary and should go. enclosure_remove_links and >>>>>>> the put of the enclosed device should be sufficient. >>>>>> >>>>>> That would make more sense than trying to "reuse" the device >>>>>> structure here by tearing it down and adding it back. >>>>> >>>>> OK, let's try that. This should be the patch if someone can try >>>>> it (I've compile tested it, but the enclosure system is under a >>>>> heap of stuff in the garage). >>>> >>>> I can test it now. >>>> >>> >>> Yeah, that looks to have worked ok. SES disk locate was also fine >>> after losing and rediscovering the disk. >> >> OK, I'll spin up a patch with fixes/reported and tested tags. > > Did this get sent? I can't seem to find it :( > Yeah, but you were not cc'ed :( https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20200114&id=529244bd1afc102ab164429d338d310d5d65e60d cheers. John > . >