Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5347611ybl; Tue, 14 Jan 2020 07:30:18 -0800 (PST) X-Google-Smtp-Source: APXvYqwdNn9+CaXkm9WkvCqnWr6uExaN57N/NmDPE2v/EXNxMp7cnpQijNq7Wsx24XBlKnmsFSOL X-Received: by 2002:aca:1a10:: with SMTP id a16mr17513943oia.9.1579015818377; Tue, 14 Jan 2020 07:30:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579015818; cv=none; d=google.com; s=arc-20160816; b=QLn5Rrl45XnpfkP8fu7eOEWmiU8mO9JU+6TKJw6qspqqjZoVNfwsr+ZY5Z+XrTIBls cIKKVmZuIkj2d/bIBWtfUWIL5kXJOjO8051q9ts9KFCHA1FCt7QZ5kEGjIlSnj5Jarnb 8MjvJEI0jydklhBliVvwBjkVR9OKgfe073OR80v0aIvBX06yDTph3WMAAx6IsnRUQy3G q3CatqKDG0KTQ6gBpWklVfCzb6xP+G2/fQTPtoqJTGYcIvJ9xT6RjUd1nfdO+ji+nu8R ktlMXp94Mjo/i2qaUFtGsq5q5OvKYHw7EI104Zh3RgEFJzF5O+Y57R45uNz8jCRc1rGb +nBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1GdtKIrgnwJPEkl97w+dYLhoQLtrorOKTTMVf8n98w8=; b=MboV9dKuOxYzHFI67DNlnTqycGAEUwLQdoeiS1nAN1IbYD7NEG7QDI4PMz6T2qI1Q5 noLgr/Na5utitv6bs9nAiayLxnOiqMUHJAb/Emxo4tM/9pJ0kWIfYxH6YHxQHy7k27o6 XTUdPbJ4l7x0Pdj8B+/jgajK8DipKDtNJuR2qveYC/fqdEpSq1t/j/WnfCVKjJWGH2N8 ciYPXMamB8hnPthiwy+kZZD1iqPBChQ7RPsjeqSfwXYKeDXweTwV6+DdxviQlsy7HgXi TjOr6KMtEo7u4BwJl83XJ+i9v6mYOept52PSRTRY0egA6KXBG7sc1odcG4FiG+L2iLfL GfIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="sU2/Zaou"; 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 q1si9041409oti.234.2020.01.14.07.30.06; Tue, 14 Jan 2020 07:30:18 -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; dkim=pass header.i=@kernel.org header.s=default header.b="sU2/Zaou"; 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 S1728760AbgANP2L (ORCPT + 99 others); Tue, 14 Jan 2020 10:28:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:47284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgANP2L (ORCPT ); Tue, 14 Jan 2020 10:28:11 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2438F2467D; Tue, 14 Jan 2020 15:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579015689; bh=Qd9PsMTYDvdqZd9t2nadVVh75qz3KZLa8XaHb1mZrwY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sU2/ZaoukzDLr3UNOcE9FRKbegbPg6R2CrffC1Qb4JG8aQkDux1HKVnU/fQxczH6y UoigEGxKvuQc5WUbZ3aPAnQ/oWZCnOp9hc14B8sooBBmquDXe5DlFuP7YkiaqMStrW 5WxL7w9X26vxPlYXbKRWR203EhlLuZkWvi5wubAo= Date: Tue, 14 Jan 2020 16:28:06 +0100 From: Greg KH To: John Garry Cc: James Bottomley , "Martin K . Petersen" , "linux-scsi@vger.kernel.org" , Linuxarm , "linux-kernel@vger.kernel.org" , "saravanak@google.com" , Arnd Bergmann Subject: Re: [PATCH v1] driver core: Use list_del_init to replace list_del at device_links_purge() Message-ID: <20200114152806.GA2043229@kroah.com> References: <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> <6820e1c4-07ab-0748-0bf3-e1c25c524a40@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6820e1c4-07ab-0748-0bf3-e1c25c524a40@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 14, 2020 at 03:20:12PM +0000, John Garry wrote: > 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 Hey, less work for me, that's fine! :) thanks for the poitner. greg k-h