From patchwork Fri Mar 10 22:41:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 67833 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp10087wrd; Fri, 10 Mar 2023 14:55:55 -0800 (PST) X-Google-Smtp-Source: AK7set/UzHF366LzrlmqaceBu7/rA7N+FgFufJ3XcP0CiYo9QILzd4DeMvQB97A0ExW40BV1Q2qg X-Received: by 2002:a05:6a20:8416:b0:b8:499d:7c9b with SMTP id c22-20020a056a20841600b000b8499d7c9bmr33433500pzd.51.1678488955037; Fri, 10 Mar 2023 14:55:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678488955; cv=none; d=google.com; s=arc-20160816; b=Njk85JRtanSPkopTk3rveLP9QhWS5dtOOhwDi7IFe7CxkW9fPJiJTZ/6OpIKC2XEk7 7pc6LAP6rCF3XaHxX40zkX+OF2l+L2pa/ekkEmD9+TInoUcQGBUolv43n6ubqQR+CRof F1/YuYLUcEEtdgWEN4RhpSOwQA6xkC0+uQHRI1dD+BQ6tdlZogRJN46j7CLYlrbrFb5U 9wxpc6BW92Ag7Rd2xat8wG5YTa1QzKuzGeYmaFt0ztEtBSPHRJxS7KG6jY8POwOC0nkY AseRu0yLcOg4XvLzGZTBwSV+k12i9OIJ0lO9Q8xJ8qUAmrT5NHYj7ViNhk29LZtH/YEC AvGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ev/yFEYhFKsMSdA8Uu/x7AxJCljFTv/aBx5MCXxYK7o=; b=k9cUOo/HBVlFxv/gKBPr/cAn+qR+qBcgTxbXCLBmgMQbB3kbvhLwk/2aLK6x9UgXp/ hbFfuq3gnsf2CS8eQEHoCem0PVjOzpa33NEKT6yvcbzM5ma79AeNtCEEVtSi7E+u8XH3 TCNanmSCJo9qIZiEqnZntXpetjrTiTj7atMK5Y5E4tNNOe/PktIVTS52wf1z17JsNcJF uuN2/r7cSpjbPyjv0REwuIvYdfAi/ZIgcmUYYil5B9ZKQzt4ZpVgOk4OFyuLyhHDgqE6 6gZdts7qU4/S7LKTySR9Na9cwU5XeA8P0ZO27oaM0qnLgkH9ql7kgWDJQn9kXGUhGeNr 7v7A== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w69-20020a638248000000b005074d06d833si803941pgd.427.2023.03.10.14.55.31; Fri, 10 Mar 2023 14:55:55 -0800 (PST) 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; 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 S231473AbjCJWmg (ORCPT + 99 others); Fri, 10 Mar 2023 17:42:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231830AbjCJWmI (ORCPT ); Fri, 10 Mar 2023 17:42:08 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFDE314D083 for ; Fri, 10 Mar 2023 14:41:43 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1palQg-0002dA-Ci; Fri, 10 Mar 2023 23:41:38 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1palQe-003GqK-PW; Fri, 10 Mar 2023 23:41:36 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1palQd-003uEV-Tw; Fri, 10 Mar 2023 23:41:35 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Stuart Yoder , Laurentiu Tudor Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] bus: fsl-mc: Only warn once about errors on device unbind Date: Fri, 10 Mar 2023 23:41:23 +0100 Message-Id: <20230310224128.2638078-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> References: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=959; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=soyW7qTmvLYZjqko2bU9Wwukx4vz+pHXyLiUEo5BE/k=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkC7ICu4CcOxQg/SDY7ITR2qMbSiRlYm+mW1eYT 2LMemXdmyCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAuyAgAKCRDB/BR4rcrs CTO4CACB4/9hoCCFS63udqPEt25X5YNtEcx6g17uulRdRr3YvP0UrswrzXQcFDuua+LWWn3jbt0 95PWumPSIH+HoznhsoXg4e5CWtEPRR9oM00ZSR5M5R6+HONbarn/jiE1eGrGK06hrOiKrXp2HQG DdWhR/qEGVjxNZmAw+cm3eS+4tiex/oIN+TgD3BZMS+iZMJI9wp4UN/Nx+IYFWLUp9Yfpl4IbxL PpFV3rzLosWHSubLoWl7WZWwhMku4s8cxeRduT00Dp3X5lEmPYkYW3ryh/aMlQeNsV/9hhQ7vAo tzihQ5oJECMj5dnRkfvBR37bT0n/BGO3saVBnptKAKFDqXot X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760023234726687008?= X-GMAIL-MSGID: =?utf-8?q?1760023234726687008?= If a platform driver's remove function returns an error code, this results in a (generic and little helpful) error message. Otherwise the value is ignored. As fsl_mc_driver_remove() already emit an error message, return 0 also in the error case. The only effect is to suppress the device core's error message. Signed-off-by: Uwe Kleine-König --- drivers/bus/fsl-mc/fsl-mc-bus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 36cb091a33b4..1531e6101fb1 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -457,10 +457,8 @@ static int fsl_mc_driver_remove(struct device *dev) int error; error = mc_drv->remove(mc_dev); - if (error < 0) { + if (error < 0) dev_err(dev, "%s failed: %d\n", __func__, error); - return error; - } return 0; } From patchwork Fri Mar 10 22:41:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 67824 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp8779wrd; Fri, 10 Mar 2023 14:52:02 -0800 (PST) X-Google-Smtp-Source: AK7set8NagPj2mZBK1HBu4bSHYzK4aK72vMMbeCGCG1XNAWh83O6sozmQrK1IgDhcsnF7uFuw/ud X-Received: by 2002:a05:6a20:840d:b0:be:c1b2:514d with SMTP id c13-20020a056a20840d00b000bec1b2514dmr4476405pzd.13.1678488722284; Fri, 10 Mar 2023 14:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678488722; cv=none; d=google.com; s=arc-20160816; b=AhITDCSwE+5KdS10j03DpFhR5M7V8kAJgdd4IXGNgUsDineZllBzGj/+lOfbOA0JI1 qKib/qx5icxRluoydnExnjjukwnfSNX5vWzH2m0/83Ra2HDTuZd3MXq03VWeVyJk4UtT y0EVbQBwlx9IeWda6GyIBcJnUlEEFaJtInPqBr3hjw32fkrUIAU9d1Qt7CLnqleU9nyv V6cTnx0MiMrga0/H/2mzKMiqJwEA3s0HvllmVxccQDbsoLO2O/rBjV6vbZ0uGOBW0KCG s2B1MJ8m1316mKV7xb/lsH0U4QUm9cDpm/XzpeFDyKGcM7r09e7sPmZjICELUS59tkfX JGAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UbcYGmAGpv16KQ4GoVbrRe4aui/Oj1y5e4VDM10sNW8=; b=emjUpPCvcxKuBhgHlRlH36Gn++mlvcp+4dstvCIvQz8jAB95QfKjQHMHEgzCaEsLHs TbQ+kjh0fkn/GIC5qc/u0tIvzGu/knMTGiSTaP7i0XJ9fhwjT8UtLQPABAwOJ8zHHkVO XUTUFxKie37Ij/OukX5ya2a0G30NjYeBxBXuUxOu6GGuNDv7rXnMfDUXQnSZ2FtRV55k DU7/6ssXokUONaa6/NXU+dVwQ2OiOgz16sYAuHwNLDxXtj4z07QfgJARnr1+4jQln6qW /fTtIj8xn9bTsDBzNHaY+401Wx33vSkzSg40t9Ga5kJK71KnuWyFpXFVXGOaMW9ucgqu Z0gA== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g5-20020a635205000000b005074d6754e3si827729pgb.255.2023.03.10.14.51.14; Fri, 10 Mar 2023 14:52:02 -0800 (PST) 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; 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 S231714AbjCJWm1 (ORCPT + 99 others); Fri, 10 Mar 2023 17:42:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231766AbjCJWmG (ORCPT ); Fri, 10 Mar 2023 17:42:06 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF3A214DA10 for ; Fri, 10 Mar 2023 14:41:42 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1palQg-0002dB-Cc; Fri, 10 Mar 2023 23:41:38 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1palQe-003GqN-Ss; Fri, 10 Mar 2023 23:41:36 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1palQe-003uEY-3g; Fri, 10 Mar 2023 23:41:36 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Stuart Yoder , Laurentiu Tudor Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] bus: fsl-mc: dprc: Push down error message from fsl_mc_driver_remove() Date: Fri, 10 Mar 2023 23:41:24 +0100 Message-Id: <20230310224128.2638078-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> References: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1279; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=zyomHc/a8RjH8rB16Pl7Aa7f3JBTHoJGdtnzhJxLWMk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkC7IFde5cyfUUkluP5sb7EamLPCdvIGyRB0CDc 6qzXQhBDUqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAuyBQAKCRDB/BR4rcrs CbADB/9d/5bLFRXln06G6ARKHRV+gcjOlv4P0ca124EZ6TwrRFHYRbbXlkHt9INfzPIPHT7CS9f MkH+Dh01R5ZH+tmMcArElHWhm3c0nJGcySFZgTsZCH/+SJX5wCk+gHXRGWHWX8G6ATfvQ5eiQr5 53Q1y0De1BXCmJBdW29mm4GN5PLcdteL7oVKRJIYY+y41vtGXXxdwQAKv5nTZi9S4bcRe8GZmGe IM2JeI1mzP++cK2M6UCdd7KPCU7GTuhhQ6IoF35iA+JPHe8kV9dqtV83702BPxxVVPAgGmrKOTu eoNge9LwTl84FvjOIFkLuaHIg6EBzbeczfHkA1TO7Sx153Ra X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760022990345779598?= X-GMAIL-MSGID: =?utf-8?q?1760022990345779598?= The error message emitted in fsl_mc_driver_remove() is very generic. Replace it by a message that mentions the reason for the failure. Returning zero instead of a negative value has no side effect apart from suppressing the generic error message. The first if condition in dprc_remove() can never be true, as this would prevent successful probing of the device and then .remove wasn't called. So this can just be dropped. Signed-off-by: Uwe Kleine-König --- drivers/bus/fsl-mc/dprc-driver.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c index 4c84be378bf2..ef4f43f67b80 100644 --- a/drivers/bus/fsl-mc/dprc-driver.c +++ b/drivers/bus/fsl-mc/dprc-driver.c @@ -839,11 +839,10 @@ static int dprc_remove(struct fsl_mc_device *mc_dev) { struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev); - if (!is_fsl_mc_bus_dprc(mc_dev)) - return -EINVAL; - - if (!mc_bus->irq_resources) - return -EINVAL; + if (!mc_bus->irq_resources) { + dev_err(&mc_dev->dev, "No irq resources, so unbinding the device failed\n"); + return 0; + } if (dev_get_msi_domain(&mc_dev->dev)) dprc_teardown_irq(mc_dev); From patchwork Fri Mar 10 22:41:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 67830 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp9824wrd; Fri, 10 Mar 2023 14:55:09 -0800 (PST) X-Google-Smtp-Source: AK7set9H3sB+5b0lXJoYRMsFY5pSbDlKV7qUtpC0+v2tTwT73runTVRUzP3sGiwJeIQEvDQYHMhG X-Received: by 2002:aa7:9f1a:0:b0:5df:5310:e2f9 with SMTP id g26-20020aa79f1a000000b005df5310e2f9mr19427248pfr.22.1678488909195; Fri, 10 Mar 2023 14:55:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678488909; cv=none; d=google.com; s=arc-20160816; b=O/LzGglKDysw1Pb1suXCTEtTbNykybLwmsaYE08y8YCBNRQUn+33bIRzxzleOr4R7q XqvVlG2+qABmTpxRnX0sBDNpu3kMZr3CZNxeF5iwZOFZnXf12PsmO9jBfgcK7DIntQWU cH5iFqa7XsohYTyWBjsujbFtPdk94dV7TVdrCvtRKcGSMglP2gQvQTuJkJwStdwKDxat VUTWwy3VlXWcUoxvSWg9gAYCtQhn0cC2wHj7aE+vP/Xm+HWsb8vDahkPVGIJNTRjVVk7 0ZFtpxtGzRFoSEzuhNdssYkI30ZO0PCMORrQAf/hb1QVqttgj0VkC/P7f8qXtv5hQcQC ZSwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=t4g1dpVL9vi0BNj7nx3GV3SsGWfOjKNdVEIPkd5/jLE=; b=dJzB3ZCgo66/AgzygRVr9T7QswZeW2/osFG9sU/r0b7eK7QVxKFGcYJ0S9677HUWao H2eARLOlwqiK9r43gRZnKX+s1eZ5eHN2ZtJthdEvZUYgV+BxphTx83sQGwoD5Q70Zuhe DrI4jB2yAVkykHKZyyGVezqW4nPvLzlH60I1kfMPgh31XQpJgUDFApZBYUgnEBvyU5bk 3tl2Kr0Pd8wXgZkEStCEiihGETVlqfS6eCqZ22V/NnG+TBb65DKlMvVayIAC3Abm2uet zzChKuZCdYrJeg5Vmr4JAZ3Mnc41B4af8hx7rwchvXXZqFh5x63m381vqrJ2jI0OIheP tCNg== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a630309000000b005030925d31asi872464pgd.203.2023.03.10.14.54.55; Fri, 10 Mar 2023 14:55:09 -0800 (PST) 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; 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 S231954AbjCJWmm (ORCPT + 99 others); Fri, 10 Mar 2023 17:42:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbjCJWmI (ORCPT ); Fri, 10 Mar 2023 17:42:08 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D6814FE04 for ; Fri, 10 Mar 2023 14:41:44 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1palQg-0002dC-Cg; Fri, 10 Mar 2023 23:41:38 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1palQe-003GqP-UJ; Fri, 10 Mar 2023 23:41:36 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1palQe-003uEb-A7; Fri, 10 Mar 2023 23:41:36 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Stuart Yoder , Laurentiu Tudor Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] bus: fsl-mc: fsl-mc-allocator: Drop if block with always wrong condition Date: Fri, 10 Mar 2023 23:41:25 +0100 Message-Id: <20230310224128.2638078-4-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> References: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1280; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Us0uaGo+ZVeSCyVAMYktRapjadAzUAbMySr9dkZDyhY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkC7IIiLBXyBkvldrNjLxXSuVihB+XZFHPrH9iZ bSlYnYChKKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAuyCAAKCRDB/BR4rcrs CUUWB/9/k9C4veBM5Ob0UtSIRQ0RivJZb9RntiAY5ubwFG0IuOjbbv7HTRcqEAHgS4cjiroDepr fSyQLcyu3ha75lLy3dvgFC61wso4UbZpTyPFO1GGUsmHihdhRP+nwnb14lQe40QPUX23fKiYKgZ 7QRGp3c+Vvlufr+G43AloQzBpDYgzqCyLH+KpXW9Wq2psPWujyDhQiFPTjci8dNQJnY/isPi6IP gsYRdbtoiB922C7ibOW7Zbu7jIjPxlTZHSlyrrrapXtN4jilw43+naa4rnKUgI9ql/lhClvqnzo LeD899Bgjn62Eyk5CVpT45EyFpAWkwkzDITW1VPBtDSVa/pU X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760023186236187026?= X-GMAIL-MSGID: =?utf-8?q?1760023186236187026?= If fsl_mc_is_allocatable(mc_dev) evaluates to false, the driver won't have bound to that device and then fsl_mc_allocator_remove() is never called for that device. fsl_mc_allocator_remove() is the only caller of fsl_mc_resource_pool_remove_device(), so the same check can be removed from there. Signed-off-by: Uwe Kleine-König --- drivers/bus/fsl-mc/fsl-mc-allocator.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-allocator.c index dced427ca8ba..e60faf8edaa1 100644 --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c @@ -103,9 +103,6 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device struct fsl_mc_resource *resource; int error = -EINVAL; - if (!fsl_mc_is_allocatable(mc_dev)) - goto out; - resource = mc_dev->resource; if (!resource || resource->data != mc_dev) goto out; @@ -613,9 +610,6 @@ static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev) { int error; - if (!fsl_mc_is_allocatable(mc_dev)) - return -EINVAL; - if (mc_dev->resource) { error = fsl_mc_resource_pool_remove_device(mc_dev); if (error < 0) From patchwork Fri Mar 10 22:41:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 67822 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp6761wrd; Fri, 10 Mar 2023 14:46:06 -0800 (PST) X-Google-Smtp-Source: AK7set8yYTLklMJN0YVCA9ZOZeR2FbI6StHrgHg5EAgUlm/cR2jHYcG3QV1y17GGFPUvYpYoCni2 X-Received: by 2002:a17:90a:12c4:b0:23a:f4e7:733d with SMTP id b4-20020a17090a12c400b0023af4e7733dmr11682503pjg.10.1678488366392; Fri, 10 Mar 2023 14:46:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678488366; cv=none; d=google.com; s=arc-20160816; b=eJa7DhHSq0EWUmfDDmQY6OFbYl35eIA2QOSyipPzyfK6fkk/Ei1SBFYxD3K9KQ9gPf YK9bgiXkV7VCmPZGG3wzHao7pLVv/jbL4+WLB64T88NgeBgHnRqTO1j75QkPzka0dEGv +LAcY6hwibr0BZ5PWiRXFAr5O4sjdo04z88ivJYIb7a2fFD+KBvTkNCOGASplLrKKC+3 XXRWRKPk27FPDvgGM7cHm9KQojAKEcdXnF5Rw+SgT1ennUH6qqXAWPt7y/3RNADwT71o AFToW7stJmrDoEpC87bJ65dUq5/nHstXatII+U8Lv6E+G3Dn92UZefpoNZD1bTQI/l3q 23dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ppFfa+Jsrx1+yLuL86+HmSXS+HPAoP5uwhJ49hrAPm8=; b=UfWa3tBCVq9FnZ3XqHaZ0iM/Xdxrj4fOTj90yXFKxQbpND1ftXdiZoqU+8A8DHAAqZ uNFk9gtn/yqFlCK0GF/1xIyl2E6kX8hyrHpJePmUxICX5a/bOrqLhyXZHNwSHkbh9ors vA2NeVA9VKMsdjHVrPfbjmLlwK09DVijM9PauG62bPyZigCupSAXzvJ/o5P5MTHr4Smq xoB+mg02vnTtrU979E6aLEVC7/jk+Qcj17FaHUd18/QW1xxF1w5y6x2161CFUoffbbIj WvCsmRtzyb6j58cLTVa4J4b4sABKzQY2TJ1FAe6h10YBvIhEbcYOPPUxysk1tNpFc7ch U3lQ== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a17090a5b0900b00230ff98778dsi801776pji.144.2023.03.10.14.44.53; Fri, 10 Mar 2023 14:46:06 -0800 (PST) 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; 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 S231395AbjCJWmW (ORCPT + 99 others); Fri, 10 Mar 2023 17:42:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbjCJWmG (ORCPT ); Fri, 10 Mar 2023 17:42:06 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76ECA14ACC8 for ; Fri, 10 Mar 2023 14:41:42 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1palQg-0002dD-Cl; Fri, 10 Mar 2023 23:41:38 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1palQf-003GqV-C4; Fri, 10 Mar 2023 23:41:37 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1palQe-003uEe-HA; Fri, 10 Mar 2023 23:41:36 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Stuart Yoder , Laurentiu Tudor Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] bus: fsl-mc: fsl-mc-allocator: Improve error reporting Date: Fri, 10 Mar 2023 23:41:26 +0100 Message-Id: <20230310224128.2638078-5-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> References: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2224; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=m2h84BsJapWQ+IP/SZ8E8V7ar6wuL3BLup87a7Nixzk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkC7IM8pg2g6H3wvwxPUVPKdlZoGauxCIeCp/j2 I+Raw+nlGaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAuyDAAKCRDB/BR4rcrs CZMuB/0eCfFruQMz0wK1d6qgSDIzcVBfL8c2MHcqYpHOhs7bWc+lEJKrSgHjislIyLjat3xR9U9 KQh+LY9ORGrQvlSYGaqFyjXqey6nvAgySQZE+f+S5WQ+5S565+iFn/N/uI4n2el+HXjUmCKo2JN upmv0FpP0qeguyBr0hdzTbzWmMRqvjy6HCLsQcEdVRytGzxKsARdV18dNl2iAtUnGc62gMAJTdi 2etKfkhATvuK3LQrjOb4blRVjhopNkTIiPAaD2sQSeihTc/d0Ntmd+oR8QXZdRdS8q/IgTL7iqN nQGF+UDm9vle4ilielCJ/htVNRkTud1SV0xGmgg08P/HHPCO X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760022617100620547?= X-GMAIL-MSGID: =?utf-8?q?1760022617100620547?= Instead of silently returning an error in the remove callback (which yields a generic and little informing error message), annotate each error path of fsl_mc_resource_pool_remove_device() with an error message and return zero in the remove callback to suppress the error message. Note that changing the return value has no other effect than suppressing the error message by the fsl_mc bus driver. Signed-off-by: Uwe Kleine-König --- drivers/bus/fsl-mc/fsl-mc-allocator.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-allocator.c index e60faf8edaa1..36f70e5e418b 100644 --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c @@ -104,22 +104,30 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device int error = -EINVAL; resource = mc_dev->resource; - if (!resource || resource->data != mc_dev) + if (!resource || resource->data != mc_dev) { + dev_err(&mc_bus_dev->dev, "resource mismatch\n"); goto out; + } mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent); mc_bus = to_fsl_mc_bus(mc_bus_dev); res_pool = resource->parent_pool; - if (res_pool != &mc_bus->resource_pools[resource->type]) + if (res_pool != &mc_bus->resource_pools[resource->type]) { + dev_err(&mc_bus_dev->dev, "pool mismatch\n"); goto out; + } mutex_lock(&res_pool->mutex); - if (res_pool->max_count <= 0) + if (res_pool->max_count <= 0) { + dev_err(&mc_bus_dev->dev, "max_count underflow\n"); goto out_unlock; + } if (res_pool->free_count <= 0 || - res_pool->free_count > res_pool->max_count) + res_pool->free_count > res_pool->max_count) { + dev_err(&mc_bus_dev->dev, "free_count mismatch\n"); goto out_unlock; + } /* * If the device is currently allocated, its resource is not @@ -613,7 +621,7 @@ static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev) if (mc_dev->resource) { error = fsl_mc_resource_pool_remove_device(mc_dev); if (error < 0) - return error; + return 0; } dev_dbg(&mc_dev->dev, From patchwork Fri Mar 10 22:41:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 67831 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp9842wrd; Fri, 10 Mar 2023 14:55:11 -0800 (PST) X-Google-Smtp-Source: AK7set8sjxUwwq9ExdCydLrHFbJgqR6K8DohOt8IfjNIyrbmd+My2R49Tszolc1egnA9GY27T8It X-Received: by 2002:a17:903:11c9:b0:19e:cfbf:dcbb with SMTP id q9-20020a17090311c900b0019ecfbfdcbbmr17741124plh.66.1678488911524; Fri, 10 Mar 2023 14:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678488911; cv=none; d=google.com; s=arc-20160816; b=UMdhh5EB+jMMiFrsXqyOxtadPqHsfApk1B3EVT4ehFoTGvWe3P33lUaAfhDR0yiWPf p8Ksn235gYwT4Iw4liWpU0tGlHCv0b8BkYyMJ71levNUq/8Fr5WCkvcmwJd0DnxGloEM QgC9ij4BDMc0ZZKIyRmY9EvEXXwFVmYA70gpI/gmZ1LhnS3Um/VCUQBXvXhxA3Ly2vQo 6ay1T55AKGQh8gxMPp9RsF2dmdAu/ksJoC4vuaG4bFAUyF8rHSwOuBazsI+BpKwYmyEF ak/2nxmQg03nbRwY7k+isVMQIi6LkPlLEqB6VtvUUgeG9O7eOFadOEatPvYXM2zHuPBH KQxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=EiQ1R6WbbuaD3Hc9uREXBOCOenJitTBvcYzmZS6NQhM=; b=g7YYuDUCLqG2hCpu1vaLPX4tt6ifxI54YUXnj4eLQeV1tLRJUtizzpEgbSBns+NH5L X4uwXKuZnIqcKKTU1EcrHZ2UiWGdExUrQCKk10UALGcf9+sXbnZegqn2DYzW4QRHhGbj kmVb9qtbYXHrnKR4mljDP1F6iL0Eu5VmT40n8+EdqO8c3qPWpREW/PTZ9BQR76qNvzff an5txrwYU3ppkMSVZtkA4z6nySYZuC+f5novDs7cwfY6K7NUyTdR5odwubtlDKdRNJlu 94gz4rX/sJ9eYV3B+Ksn3WLhh4FSaiHlH1MpH3YzO96g8Rtgd6iHeruf0hpzfdKYJpM4 a9PQ== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ke8-20020a170903340800b0019f24b0388csi171801plb.486.2023.03.10.14.54.58; Fri, 10 Mar 2023 14:55:11 -0800 (PST) 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; 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 S231682AbjCJWmc (ORCPT + 99 others); Fri, 10 Mar 2023 17:42:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbjCJWmI (ORCPT ); Fri, 10 Mar 2023 17:42:08 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5029214FE05 for ; Fri, 10 Mar 2023 14:41:44 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1palQh-0002dE-9u; Fri, 10 Mar 2023 23:41:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1palQf-003GqY-Fa; Fri, 10 Mar 2023 23:41:37 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1palQe-003uEi-NF; Fri, 10 Mar 2023 23:41:36 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Roy Pledge , Li Yang Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/6] soc: fsl: dpio: Suppress duplicated error reporting on device remove Date: Fri, 10 Mar 2023 23:41:27 +0100 Message-Id: <20230310224128.2638078-6-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> References: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1085; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=jrvcriG6LY6cgmfGJKCy0SYPFV25hxPQL+k/hItVWeg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkC7IP8/ceFmpLmvUa+JsfOgJYo497N77Opym3s j+VaP7QeOGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAuyDwAKCRDB/BR4rcrs CVd8B/0VPto9yl5L2YKsfnTkyeyixLFuoF5giyuRmEzixWQLgAOxwFlkNcvGPkZ90qZb21QU1mo Kpbs8F6zt3hXiJVvZkdaUt6uMVRB+lQaRELXDQuwrKi8hYbMGkumj0DA0FakSoQQrn1ouqd/T1S Ww8QCmU/aAl5ncKRoJZVQq20saEPSV0TPAj2QcjhHvOnjXRxt9QPjOt3UWJd5cezIJn5fEongop 0mVDsnqLmNQnn94Dw47gAAU1Zb9l94LVWyzPl8Qoxt6GxIZhT4uFBg0Hq5CT4RCSIX2J/eNV+dP 6bCsDwjxVFhZvC+ebQoPTnRGNS1ibo9X9qG7BsdO5O0B5J8g X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760023189220931625?= X-GMAIL-MSGID: =?utf-8?q?1760023189220931625?= Returning an error code from a fsl_mc_driver's remove callback results in a generic error message, otherwise the value is ignored and the device gets unbound. As the only error path in dpaa2_dpio_remove() already emits an error message, return zero unconditionally to suppress another (less helpful) error report. Signed-off-by: Uwe Kleine-König --- drivers/soc/fsl/dpio/dpio-driver.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c index 74eace3109a1..09df5302d255 100644 --- a/drivers/soc/fsl/dpio/dpio-driver.c +++ b/drivers/soc/fsl/dpio/dpio-driver.c @@ -297,14 +297,10 @@ static int dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev) dpio_close(dpio_dev->mc_io, 0, dpio_dev->mc_handle); - fsl_mc_portal_free(dpio_dev->mc_io); - - return 0; - err_open: fsl_mc_portal_free(dpio_dev->mc_io); - return err; + return 0; } static const struct fsl_mc_device_id dpaa2_dpio_match_id_table[] = { From patchwork Fri Mar 10 22:41:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 67825 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp8780wrd; Fri, 10 Mar 2023 14:52:03 -0800 (PST) X-Google-Smtp-Source: AK7set8IR7fx2+/2R1SWdL9UOivZ/lmyKqcj6CqgyzfBV7JCsjyy76QI8F3IqVc54k6z/WKA7Jw5 X-Received: by 2002:a17:903:32c7:b0:19c:be49:48e1 with SMTP id i7-20020a17090332c700b0019cbe4948e1mr32331456plr.7.1678488722620; Fri, 10 Mar 2023 14:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678488722; cv=none; d=google.com; s=arc-20160816; b=KNvM1R4N1kA5AGGr8pPdffCLFR91f32pk69Q6L7NauXN0pcAGAqmlKTaHaFeqvnWWE FW1PR6axvtqqpxz7xCKIZy0q3NUhGP+7Yj+J+JDxtLZ8dvv6i1vHUwzNmkGHZg1+C3Jf QfNnIVaM0pX79wf4moBxKjrSNyP9Cg8S01Xkvk6Mq92y5F1xJ3H7OPQIps47jjcjrct5 4YA7ccB02F+ko/WPqChZqUR71z2Vul6gN3jN2upwopQQ2Da277dxJ5qYMp1HCduha5wn rCxb2jZ0hZiggv3HW78ZziVAIndv4YriTW43GjUVBmg3Hqck4C9/VDDsOPa05AeMbCFV ubRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XaVfiL++rmKIp6AflxK6BBCPwMQueGtskxhBBuEvYCs=; b=PhGIsGB7SzYVkfihLoQL9G0A/qo3mWmAc2gjM8bY2iD5ApFdYO3E9dR71yCFEFPPN4 C0uGPJpl4Xh/h+z7QIQqQNIOrm+hpuJbpu/wRiawPF5e2k7juvMKT7xz4hzQnQViIpD/ Jk0mRIjPJIX5SOZpu21pFJL+CffoOK2tlt4U87oK4STnd/FxtlN5qAk7n3k5RVHTjxLG 9iT0oR6UPJnQdckhK/PuydDZunBiliH6rDFvGdLfSaDHw9i2nra7eMlHciODn1Tk7mry D8FctHv8dUeOrWXx2H1KuEZz6DCMwNjbIFdUEpwuwCABxNKCZ9pBKiwLknN6wkGN/NY1 ikvg== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kn12-20020a170903078c00b00198fca8211bsi940943plb.57.2023.03.10.14.51.13; Fri, 10 Mar 2023 14:52:02 -0800 (PST) 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; 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 S232030AbjCJWm6 (ORCPT + 99 others); Fri, 10 Mar 2023 17:42:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231741AbjCJWm2 (ORCPT ); Fri, 10 Mar 2023 17:42:28 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 204C7147760 for ; Fri, 10 Mar 2023 14:42:07 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1palQh-0002dF-AE; Fri, 10 Mar 2023 23:41:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1palQf-003Gqb-K3; Fri, 10 Mar 2023 23:41:37 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1palQe-003uEm-Ud; Fri, 10 Mar 2023 23:41:36 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Stuart Yoder , Laurentiu Tudor , =?utf-8?q?Horia_Geant=C4=83?= , Pankaj Gupta , Gaurav Jain , Herbert Xu , "David S. Miller" , Vinod Koul , Ioana Ciornei , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yangbo Lu , Roy Pledge , Li Yang , Diana Craciun , Alex Williamson , Richard Cochran Cc: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Subject: [PATCH 6/6] bus: fsl-mc: Make remove function return void Date: Fri, 10 Mar 2023 23:41:28 +0100 Message-Id: <20230310224128.2638078-7-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> References: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=10084; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=9mBAd0011vCFVMqmKv0sG8u7xl0d5ng9BqpXGJnY3UY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkC7IS4iDBmtk6endpHGEPsd8XTh4Wj6zZvJ4+p 3A9Hbr8tomJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAuyEgAKCRDB/BR4rcrs Cd01B/472HXgkkn1dxwJPe/PvNhCuB9iH9vI0Z1P6W+GYbYOaQK+LurDS+akY5QNd7tjzm4qWfm dZ4bbwuSY/lbJGxiDl3ZPsis0maetj+wnZFrxeVoH6+lNMmDaY8mqcKRjYRudOrP7aHGH7G7SQR o2n7D3BLUtp8aa6N9z87rmGT0CjTgOHoBshxHP2X5C/Mxs0Salc6xzduYSqyA5gqyFx4hwYaGcI vxLxA0+n0+TvBJGthGurOF977Cy8QlSysrsMuNnlOu2h241u2Vmr5ZOt8IqzN4D6e7ZDOOaG7d9 akuL2eJqsYXWXQ/ODB390DjCekbI2cL9jLOdoZn7SuQnOYWF X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760022990729942948?= X-GMAIL-MSGID: =?utf-8?q?1760022990729942948?= From: Uwe Kleine-König The value returned by an fsl-mc driver's remove function is mostly ignored. (Only an error message is printed if the value is non-zero and then device removal continues unconditionally.) So change the prototype of the remove function to return no value. This way driver authors are not tempted to assume that passing an error to the upper layer is a good idea. All drivers are adapted accordingly. There is no intended change of behaviour, all callbacks were prepared to return 0 before. Signed-off-by: Uwe Kleine-König --- drivers/bus/fsl-mc/dprc-driver.c | 5 ++--- drivers/bus/fsl-mc/fsl-mc-allocator.c | 5 ++--- drivers/bus/fsl-mc/fsl-mc-bus.c | 5 +---- drivers/crypto/caam/caamalg_qi2.c | 4 +--- drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 4 +--- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +--- drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 4 +--- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 4 +--- drivers/soc/fsl/dpio/dpio-driver.c | 4 +--- drivers/vfio/fsl-mc/vfio_fsl_mc.c | 3 +-- include/linux/fsl/mc.h | 2 +- 11 files changed, 13 insertions(+), 31 deletions(-) diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c index ef4f43f67b80..595d4cecd041 100644 --- a/drivers/bus/fsl-mc/dprc-driver.c +++ b/drivers/bus/fsl-mc/dprc-driver.c @@ -835,13 +835,13 @@ EXPORT_SYMBOL_GPL(dprc_cleanup); * It tears down the interrupts that were configured for the DPRC device. * It destroys the interrupt pool associated with this MC bus. */ -static int dprc_remove(struct fsl_mc_device *mc_dev) +static void dprc_remove(struct fsl_mc_device *mc_dev) { struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev); if (!mc_bus->irq_resources) { dev_err(&mc_dev->dev, "No irq resources, so unbinding the device failed\n"); - return 0; + return; } if (dev_get_msi_domain(&mc_dev->dev)) @@ -852,7 +852,6 @@ static int dprc_remove(struct fsl_mc_device *mc_dev) dprc_cleanup(mc_dev); dev_info(&mc_dev->dev, "DPRC device unbound from driver"); - return 0; } static const struct fsl_mc_device_id match_id_table[] = { diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-allocator.c index 36f70e5e418b..0ad68099684e 100644 --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c @@ -614,19 +614,18 @@ static int fsl_mc_allocator_probe(struct fsl_mc_device *mc_dev) * fsl_mc_allocator_remove - callback invoked when an allocatable device is * being removed from the system */ -static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev) +static void fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev) { int error; if (mc_dev->resource) { error = fsl_mc_resource_pool_remove_device(mc_dev); if (error < 0) - return 0; + return; } dev_dbg(&mc_dev->dev, "Allocatable fsl-mc device unbound from fsl_mc_allocator driver"); - return 0; } static const struct fsl_mc_device_id match_id_table[] = { diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 1531e6101fb1..08b7dc8f2181 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -454,11 +454,8 @@ static int fsl_mc_driver_remove(struct device *dev) { struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(dev->driver); struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev); - int error; - error = mc_drv->remove(mc_dev); - if (error < 0) - dev_err(dev, "%s failed: %d\n", __func__, error); + mc_drv->remove(mc_dev); return 0; } diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c index 5c8d35edaa1c..9156bbe038b7 100644 --- a/drivers/crypto/caam/caamalg_qi2.c +++ b/drivers/crypto/caam/caamalg_qi2.c @@ -5402,7 +5402,7 @@ static int dpaa2_caam_probe(struct fsl_mc_device *dpseci_dev) return err; } -static int __cold dpaa2_caam_remove(struct fsl_mc_device *ls_dev) +static void __cold dpaa2_caam_remove(struct fsl_mc_device *ls_dev) { struct device *dev; struct dpaa2_caam_priv *priv; @@ -5443,8 +5443,6 @@ static int __cold dpaa2_caam_remove(struct fsl_mc_device *ls_dev) free_percpu(priv->ppriv); fsl_mc_portal_free(priv->mc_io); kmem_cache_destroy(qi_cache); - - return 0; } int dpaa2_caam_enqueue(struct device *dev, struct caam_request *req) diff --git a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c index 8dd40d00a672..a42a37634881 100644 --- a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c +++ b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c @@ -765,7 +765,7 @@ static int dpaa2_qdma_probe(struct fsl_mc_device *dpdmai_dev) return err; } -static int dpaa2_qdma_remove(struct fsl_mc_device *ls_dev) +static void dpaa2_qdma_remove(struct fsl_mc_device *ls_dev) { struct dpaa2_qdma_engine *dpaa2_qdma; struct dpaa2_qdma_priv *priv; @@ -787,8 +787,6 @@ static int dpaa2_qdma_remove(struct fsl_mc_device *ls_dev) dma_async_device_unregister(&dpaa2_qdma->dma_dev); kfree(priv); kfree(dpaa2_qdma); - - return 0; } static void dpaa2_qdma_shutdown(struct fsl_mc_device *ls_dev) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index a62cffaf6ff1..a9676d0dece8 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -5025,7 +5025,7 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev) return err; } -static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev) +static void dpaa2_eth_remove(struct fsl_mc_device *ls_dev) { struct device *dev; struct net_device *net_dev; @@ -5073,8 +5073,6 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev) dev_dbg(net_dev->dev.parent, "Removed interface %s\n", net_dev->name); free_netdev(net_dev); - - return 0; } static const struct fsl_mc_device_id dpaa2_eth_match_id_table[] = { diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c index 90d23ab1ce9d..4497e3c0456d 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c @@ -219,7 +219,7 @@ static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev) return err; } -static int dpaa2_ptp_remove(struct fsl_mc_device *mc_dev) +static void dpaa2_ptp_remove(struct fsl_mc_device *mc_dev) { struct device *dev = &mc_dev->dev; struct ptp_qoriq *ptp_qoriq; @@ -232,8 +232,6 @@ static int dpaa2_ptp_remove(struct fsl_mc_device *mc_dev) fsl_mc_free_irqs(mc_dev); dprtc_close(mc_dev->mc_io, 0, mc_dev->mc_handle); fsl_mc_portal_free(mc_dev->mc_io); - - return 0; } static const struct fsl_mc_device_id dpaa2_ptp_match_id_table[] = { diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c index f4ae4289c41a..21cc4e52425a 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c @@ -3221,7 +3221,7 @@ static void dpaa2_switch_teardown(struct fsl_mc_device *sw_dev) dev_warn(dev, "dpsw_close err %d\n", err); } -static int dpaa2_switch_remove(struct fsl_mc_device *sw_dev) +static void dpaa2_switch_remove(struct fsl_mc_device *sw_dev) { struct ethsw_port_priv *port_priv; struct ethsw_core *ethsw; @@ -3252,8 +3252,6 @@ static int dpaa2_switch_remove(struct fsl_mc_device *sw_dev) kfree(ethsw); dev_set_drvdata(dev, NULL); - - return 0; } static int dpaa2_switch_probe_port(struct ethsw_core *ethsw, diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c index 09df5302d255..9e3fddd8f5a9 100644 --- a/drivers/soc/fsl/dpio/dpio-driver.c +++ b/drivers/soc/fsl/dpio/dpio-driver.c @@ -270,7 +270,7 @@ static void dpio_teardown_irqs(struct fsl_mc_device *dpio_dev) fsl_mc_free_irqs(dpio_dev); } -static int dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev) +static void dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev) { struct device *dev; struct dpio_priv *priv; @@ -299,8 +299,6 @@ static int dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev) err_open: fsl_mc_portal_free(dpio_dev->mc_io); - - return 0; } static const struct fsl_mc_device_id dpaa2_dpio_match_id_table[] = { diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c index c89a047a4cd8..f2140e94d41e 100644 --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c @@ -570,7 +570,7 @@ static void vfio_fsl_mc_release_dev(struct vfio_device *core_vdev) mutex_destroy(&vdev->igate); } -static int vfio_fsl_mc_remove(struct fsl_mc_device *mc_dev) +static void vfio_fsl_mc_remove(struct fsl_mc_device *mc_dev) { struct device *dev = &mc_dev->dev; struct vfio_fsl_mc_device *vdev = dev_get_drvdata(dev); @@ -578,7 +578,6 @@ static int vfio_fsl_mc_remove(struct fsl_mc_device *mc_dev) vfio_unregister_group_dev(&vdev->vdev); dprc_remove_devices(mc_dev, NULL, 0); vfio_put_device(&vdev->vdev); - return 0; } static const struct vfio_device_ops vfio_fsl_mc_ops = { diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h index a86115bc799c..a1b3de87a3d1 100644 --- a/include/linux/fsl/mc.h +++ b/include/linux/fsl/mc.h @@ -48,7 +48,7 @@ struct fsl_mc_driver { struct device_driver driver; const struct fsl_mc_device_id *match_id_table; int (*probe)(struct fsl_mc_device *dev); - int (*remove)(struct fsl_mc_device *dev); + void (*remove)(struct fsl_mc_device *dev); void (*shutdown)(struct fsl_mc_device *dev); int (*suspend)(struct fsl_mc_device *dev, pm_message_t state); int (*resume)(struct fsl_mc_device *dev);