From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A246FC433DB for ; Fri, 29 Jan 2021 19:11:10 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F270464DE3 for ; Fri, 29 Jan 2021 19:11:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F270464DE3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4DS6Pm0CGrzDrc9 for ; Sat, 30 Jan 2021 06:11:08 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::435; helo=mail-wr1-x435.google.com; envelope-from=lijunp213@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=DdVDH9ZX; dkim-atps=neutral Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4DS6MP4kz6zDrT5 for ; Sat, 30 Jan 2021 06:09:05 +1100 (AEDT) Received: by mail-wr1-x435.google.com with SMTP id g10so9912364wrx.1 for ; Fri, 29 Jan 2021 11:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=O23rlZtfo1FZK0qx/WutTi+hkYR2QPOf0nbtZy10Zxw=; b=DdVDH9ZXqAC6pKsXfQftK93OjTPC27Nw5D2M6I8L/f2uvZev0A9JsuKm0emyUXWDAF SM7M/J5PhQl9LL8FbOW4nNny9Or4Gkqp9wlfYzTawOjIgh2P71w8aSqwWH9J6OkZmR/z GpY8TDRxBO79rLhpmj6+29vwqm6hJmzjOy6ym74Rq3Qd5KbAWfoHO4pMnjuFrxqw5gbE 9uGCmsJhWd+lFYGDpi2mUqyJdWdAgaeMHNofQjputA9/s65xjOmhqiCTbD+tW5nU+Ex1 RJTAI7mK3KBmLP/le5Q01NDo6Ed8KhScv3SWrGEHMCjKt6GT6Tf5HZfXLQ5/5hIB8Y1Z 5qpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=O23rlZtfo1FZK0qx/WutTi+hkYR2QPOf0nbtZy10Zxw=; b=OyKQsHCNNxFYyT06JH92c+OKhDnFRiCySec1+jkHjIvIaKAaUVz+LTd2YBdZUfuVat N7epJ+lI+mtES/GGKueYqw7SB1oTK69wVsElstZq3A9m2477pS08IuM0zx8a7DFk/V2b Cn3JZKP3ntxVVM8sSz/Vww5JGZUG/sXiTNHZZHtqqUJkM6K9K8pFUIYm0exZwZJPq/QJ P3Rpd87TvpY/v9IsvMiKMpWEXhTFWl/ZaBXErJjl2cFvWc1qoPmlFMT1bXJ+1fgHvu5T DaWzb2jmEXYFRfIRBaPIKfUXaQoIdyqWM6BHdS1lyzY+jgLqR7zTYQRTK+txvUExwSpX ARhQ== X-Gm-Message-State: AOAM530oGaAdHU7fIG2QQcurt18A0Lo37oMem5D2NnHEwMgRKLw+H+o+ dN+sTMnzCK5Sq1gw+RiAjtqfmrgQ3boQbqMohx0= X-Google-Smtp-Source: ABdhPJzAbgdkkapiGmzGouxTGwveq5m7LmJNveRCk+Kv9qY2evOh0QQsbBh6o6uIYkABxwRfFnIBxorHq8dmbcxo0OQ= X-Received: by 2002:a5d:49cf:: with SMTP id t15mr6034971wrs.217.1611947338629; Fri, 29 Jan 2021 11:08:58 -0800 (PST) MIME-Version: 1.0 References: <20210127215010.99954-1-uwe@kleine-koenig.org> In-Reply-To: <20210127215010.99954-1-uwe@kleine-koenig.org> From: Lijun Pan Date: Fri, 29 Jan 2021 13:08:45 -0600 Message-ID: Subject: Re: [PATCH] vio: make remove callback return void To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cristobal Forno , Tyrel Datwyler , sparclinux@vger.kernel.org, target-devel@vger.kernel.org, Paul Mackerras , =?UTF-8?Q?Breno_Leit=C3=A3o?= , Peter Huewe , Sukadev Bhattiprolu , Jiri Slaby , Herbert Xu , linux-scsi@vger.kernel.org, Nayna Jain , Jason Gunthorpe , Michael Cyr , Jakub Kicinski , Arnd Bergmann , "James E.J. Bottomley" , linux-block@vger.kernel.org, Lijun Pan , Matt Mackall , Jens Axboe , Steven Royer , "Martin K. Petersen" , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Jarkko Sakkinen , linux-crypto@vger.kernel.org, netdev@vger.kernel.org, Dany Madden , Paulo Flabiano Smorigo , linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Jan 27, 2021 at 6:41 PM Uwe Kleine-K=C3=B6nig wrote: > > The driver core ignores the return value of struct bus_type::remove() > because there is only little that can be done. To simplify the quest to > make this function return void, let struct vio_driver::remove() return > void, too. All users already unconditionally return 0, this commit makes > it obvious that returning an error code is a bad idea and makes it > obvious for future driver authors that returning an error code isn't > intended. > > Note there are two nominally different implementations for a vio bus: > one in arch/sparc/kernel/vio.c and the other in > arch/powerpc/platforms/pseries/vio.c. I didn't care to check which > driver is using which of these busses (or if even some of them can be > used with both) and simply adapt all drivers and the two bus codes in > one go. > > Note that for the powerpc implementation there is a semantical change: > Before this patch for a device that was bound to a driver without a > remove callback vio_cmo_bus_remove(viodev) wasn't called. As the device > core still considers the device unbound after vio_bus_remove() returns > calling this unconditionally is the consistent behaviour which is > implemented here. > > Signed-off-by: Uwe Kleine-K=C3=B6nig Acked-by: Lijun Pan