Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp301966pxu; Fri, 4 Dec 2020 03:47:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJymVSvSdzozeh6BFFK16SdzzZ0torxj1iIsEJBrtcYb2yjsPEL7mA9/YZhIfLoEJjhp+NqF X-Received: by 2002:a05:6402:1684:: with SMTP id a4mr2328656edv.348.1607082452921; Fri, 04 Dec 2020 03:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607082452; cv=none; d=google.com; s=arc-20160816; b=h/Aqbm7VS7rv5kdl//5026WcMJNmz740Iu9DQVSR2hqRK+tvO0eUXyPxXTNO/hMbNc lW+KmnkgkQm/5COQgUwO+t/PL3yUARzNUae8PqQ/vA/U24NUk/5GX9UJQkg45VOOi96T S9z+bBX0hL7iP5L+YnHZxXX56cPy4QOdmQC8Wqzg6BTqbWz+FRrCo/nLKbDXUtFzQ2ml YTm5hNwAiXEmgKDnP13dznezVJ3Hir7B5J3Zxz8XSrNGVBmr8raRXb1LZ+LTeVnXQsjm iknFB6HIUyUEPj2gG1v9/aVbyTZJCaYHy9Pvjn+IKxYK5wY+HZthBTCShhj7hGoNm58m 7k8g== 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-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=TLsvHtGOhDYXthE2IjxT8xN/WC37BKQnYzo2kHjAPmA=; b=0Ap/T20iwX5pgCWudtR9tuPW+AQqNw5sZqddh3gNJ8OnxHbuvhF6b99QCrkVqkvlzN OwGdubL7CKNphAw1bzkZTVzoOyo5tcJzBcm1uvelKgixEBPU5jPL8rVcoiz5H9fkeuL0 hR6OYYGfi4oeiI+C+FDfThudcX3xfWHiDUG4KrknIW7lWdQNbiM5rgg/pM+K7gdGbzCS qj75779sC0jjeIFzy669aKDtVMcAdrmnH3Zu9zY2LW0ghoIcNzMZJOswoMwJdHXTuz3Q fLhKjUKKJm17XVXSzoSfbjoXH8PsCvadbL7VV0VKj79ShBfexaO1J/Nj5oXn3QQFsTXO dSeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tSQHZ4Oy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id op9si1140796ejb.447.2020.12.04.03.47.09; Fri, 04 Dec 2020 03:47:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tSQHZ4Oy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388119AbgLDLnc (ORCPT + 99 others); Fri, 4 Dec 2020 06:43:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:38666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730032AbgLDLnb (ORCPT ); Fri, 4 Dec 2020 06:43:31 -0500 Date: Fri, 4 Dec 2020 12:44:07 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1607082170; bh=CQGde8dYRlqueEwvc7knY4CB9w4yHC8OY/IAzf3YxK8=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=tSQHZ4Oy383lMi/uHhG6/0wGOQXxLiB3LUfuHensu29AD+wOBN1igyRMiqJHGya9c XU6K5R+KCB8TR74Yiiw5rFfDPj7Nlbyzp9X7DxcgmK143cGPnHF9aLcndZrdw9YC7k mgVm7a/Z68vtSqNa1f6Z3BNBK1pegmV/pM40/CoE= From: Greg KH To: Dan Williams Cc: broonie@kernel.org, lgirdwood@gmail.com, davem@davemloft.net, kuba@kernel.org, jgg@nvidia.com, Kiran Patil , Ranjani Sridharan , Fred Oh , Leon Romanovsky , Dave Ertman , Pierre-Louis Bossart , Shiraz Saleem , Parav Pandit , Martin Habets , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] driver core: auxiliary bus: make remove function return void Message-ID: References: <160695681289.505290.8978295443574440604.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman There's an effort to move the remove() callback in the driver core to not return an int, as nothing can be done if this function fails. To make that effort easier, make the aux bus remove function void to start with so that no users have to be changed sometime in the future. Signed-off-by: Greg Kroah-Hartman --- Documentation/driver-api/auxiliary_bus.rst | 2 +- drivers/base/auxiliary.c | 5 ++--- include/linux/auxiliary_bus.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/driver-api/auxiliary_bus.rst b/Documentation/driver-api/auxiliary_bus.rst index 5dd7804631ef..2312506b0674 100644 --- a/Documentation/driver-api/auxiliary_bus.rst +++ b/Documentation/driver-api/auxiliary_bus.rst @@ -150,7 +150,7 @@ and shutdown notifications using the standard conventions. struct auxiliary_driver { int (*probe)(struct auxiliary_device *, const struct auxiliary_device_id *id); - int (*remove)(struct auxiliary_device *); + void (*remove)(struct auxiliary_device *); void (*shutdown)(struct auxiliary_device *); int (*suspend)(struct auxiliary_device *, pm_message_t); int (*resume)(struct auxiliary_device *); diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c index eca36d6284d0..c44e85802b43 100644 --- a/drivers/base/auxiliary.c +++ b/drivers/base/auxiliary.c @@ -82,13 +82,12 @@ static int auxiliary_bus_remove(struct device *dev) { struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver); struct auxiliary_device *auxdev = to_auxiliary_dev(dev); - int ret = 0; if (auxdrv->remove) - ret = auxdrv->remove(auxdev); + auxdrv->remove(auxdev); dev_pm_domain_detach(dev, true); - return ret; + return 0; } static void auxiliary_bus_shutdown(struct device *dev) diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h index 3580743d0e8d..d67b17606210 100644 --- a/include/linux/auxiliary_bus.h +++ b/include/linux/auxiliary_bus.h @@ -19,7 +19,7 @@ struct auxiliary_device { struct auxiliary_driver { int (*probe)(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id); - int (*remove)(struct auxiliary_device *auxdev); + void (*remove)(struct auxiliary_device *auxdev); void (*shutdown)(struct auxiliary_device *auxdev); int (*suspend)(struct auxiliary_device *auxdev, pm_message_t state); int (*resume)(struct auxiliary_device *auxdev); -- 2.29.2