From patchwork Fri Nov 17 13:38:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Tudor X-Patchwork-Id: 10062755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C37A560352 for ; Fri, 17 Nov 2017 13:41:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B20C12ACC4 for ; Fri, 17 Nov 2017 13:41:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6EA02ACC6; Fri, 17 Nov 2017 13:41:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AECEF2ACC4 for ; Fri, 17 Nov 2017 13:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P5y5VA/vBQJ1c4YcF0vx0NgOZwRvmQF86CJX1Z7qd0c=; b=pErJsoHA5UYZCW jMcqN56zC5Oomzzcp6fgtM7GQphL7vnBYArEOzjjZk2K4vkhowv8rZeDJ3L48UAMB64JjLk0b+FGE bWbsOAHKXTjXvtT2WpqRLssbw2CTg/ArwKrpDbbjK7QAKGBQQdrGZTCGVnRjRfmwpIZIhHXnnSz+p rdvfhwPrDGWXJRQcGpPlPhroGzs7RXPNb6knXIvBCy7Yfc3kywtMiXvVWCWCNRJm4qiZhU6o/p5Lf gxK/drFjN+inxnZjGJwxwrI8MWfe7ZABaFZJ9sYBM1q743ziEITWkbBXGSg2FbfnKRS6HwPw0VENF LuU3kXqMJoBdVb4wEMmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eFgu5-0001Ph-SM; Fri, 17 Nov 2017 13:41:57 +0000 Received: from mail-co1nam03on0065.outbound.protection.outlook.com ([104.47.40.65] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFgrb-0006gW-5x for linux-arm-kernel@lists.infradead.org; Fri, 17 Nov 2017 13:39:35 +0000 Received: from BN6PR03CA0010.namprd03.prod.outlook.com (10.168.230.148) by CY4PR03MB2693.namprd03.prod.outlook.com (10.173.43.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Fri, 17 Nov 2017 13:39:01 +0000 Received: from BN1BFFO11FD007.protection.gbl (2a01:111:f400:7c10::1:138) by BN6PR03CA0010.outlook.office365.com (2603:10b6:404:23::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.239.5 via Frontend Transport; Fri, 17 Nov 2017 13:39:00 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD007.mail.protection.outlook.com (10.58.144.70) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.218.12 via Frontend Transport; Fri, 17 Nov 2017 13:39:00 +0000 Received: from fsr-fed1964-102.ea.freescale.net (fsr-fed1964-102.ea.freescale.net [10.171.73.17]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vAHDcbAq004692; Fri, 17 Nov 2017 06:38:57 -0700 From: To: , Subject: [PATCH 07/10] staging: fsl-mc: remove some superfluous WARN_ONs Date: Fri, 17 Nov 2017 15:38:31 +0200 Message-ID: <20171117133834.4635-7-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171117133834.4635-1-laurentiu.tudor@nxp.com> References: <20171117133834.4635-1-laurentiu.tudor@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131553995409080972; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(7966004)(336005)(39860400002)(376002)(39380400002)(346002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(4326008)(2950100002)(48376002)(50466002)(50986999)(33646002)(6636002)(39060400002)(85426001)(498600001)(105606002)(76176999)(104016004)(106466001)(8676002)(54906003)(6666003)(16586007)(77096006)(316002)(81166006)(81156014)(36756003)(97736004)(110136005)(8936002)(8656006)(5003940100001)(47776003)(7416002)(2906002)(86362001)(53936002)(50226002)(189998001)(2876002)(68736007)(356003)(305945005)(1076002)(86152003)(5660300001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2693; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD007; 1:hJ8i+TodAnSbAmwJ6roIyXagB2WfIioTSyFjxJPB179FG2pEOZCq+EXPQ8E/jERffP03XDZu+Xgyvkxz/Sr+DsHzfbDeGcNgUcZFE8BU/Sk4VMW7iW7k8Kg7mdUslfQa MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1f7d8b21-09fb-452c-e12c-08d52dc08f98 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:CY4PR03MB2693; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 3:Zh4Z7S91yV6QVOfFcq31BrVQuIsH3HQ6P2SfZpzglFkySRwNe4bOq3PduuXd66Vt5Vv+eUy73HJFPU7p0i5GUuEc6IQVWih861K/ohulT3TKzrWEwnZ69eOqj8h9INHN/wRv3o2PMoUGW4YMHrYMos1CJRRZYS9qvKGi452DKzanxxe0P7NlsDnDGWP0+I2Nghynu5mkh/evU7pAwCg0YPC2dY23DYelswVSiG0k+IfaRxorM4gECsqAtwv0hG8O6ySA547PfWwmlobpaMfjommIsrobqZP0WNy0V0kn3XoUStH9ZxSLPUVy9+F0GoqcQ7OtrzaC9pOMsF/ltDkavDEuu9S2XC63FWjCynKoGWQ=; 25:Mf52OG1526QCR4Z6dhrVLoE3IQfRhVkgcXBn0wXKeJP8n2U7f40vA+SohVvN2JKpemxAxUtmeZDLZUSdBtr6bUcmJNFoew/2xX9T2bQPbQci6qt4GJfBeIBKVrr0+dq+kxT9SVKrJMnBtcNc5VjYUDlN+ShesWWvKLknP3rHUdMzOIGflHLZe0BJiyGLace9Zl/NuQWfnaGMVfOuel6hV4UMdZA9QfNCC9uybrteo6oKK/unQDa8eig8TnctxEJ9Y8QFeZ2ubgC5sH0zQhmRENE+Zr9OWJ5uSrF3ydRx7U2EpDWLcRiCrnPHdm+lD0qokCExpnCxPPoACh0oUcsBDw== X-MS-TrafficTypeDiagnostic: CY4PR03MB2693: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 31:O6fbtZzvRG6qHA6Rne0FagPqWKcCEgXhLZ92izy5v7sZzeoRB7HR+vO/HFBIvxC0XpaxCVeJrfQ32YAYlA6OOWPJ/Ix5tq7TuHO23QnteBDQC8kRg5tepK9mI7pezNFXfzO8TbhxT7B0N7+GETcWTxTXOXJzfN60I1lWWhu7O53nbEYR9+FdzVdLaWV5BuNLv6tCt0gqIG+AhI5smxCNTQZ3l9PmGCE70lszK+ZPPIo=; 4:BoLiIux8vjkDHxPhQ6a+os2XViU2+WDuY05i3lO2suub6VR3F9/c+ZWzdm0l7mNfQjDFa3O0rYCqPIXo69W2OPp4jWRheG2/VZ6/BA1e9pMqDJmyqH//0roMxRDZFhbv1l1HIaXeKhA7u06SilXfp46o5PT0VbcISVjDE7TxFfifv5fRsKkPwXMY+9dy1nMASGmXr81rAGGJt44CR5+nR+Y0qb0FcYn5BtemItAbTSCr81h82rC78Y+CKsyBIGDRryhSSF6LtwiBadAkvdiTQgfGOVfAe6eHmuYlg7ffIUBMvvppXBTH8q50SbwZzNEFq+vgS/io34XyoUV8jm10A+nCrSbOyMsdD/E1y7u6js0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(10201501046)(3231022)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123559100)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123556025)(20161123563025)(20161123565025)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2693; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2693; X-Forefront-PRVS: 049486C505 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2693; 23:mmmJnfi82lDgc/BGeIp8TzdOtScx4Z36ZEEK2yLeH?= =?us-ascii?Q?lTjpL30t69H24Nio9deMWW7MZ65HPltZY+4p0EstHOYjCdmV9Zw0l59rG7u3?= =?us-ascii?Q?to1ATcAjhUlkVe4PGgEBqnXqFJSnS6WbLqYFioKp4GBnblIGf7i1TB0AkTaC?= =?us-ascii?Q?8soz4hQVsozrgGUkdzx5TfpMUCF1Au8eizByAZwkdc5XOCwXA1KT0ntgq+Qw?= =?us-ascii?Q?9V8DXy6+h8Ju9FSa43Cfl+9eqzUfMJPq5Favk/t+b4xTu5k3w04JPUPG6o7q?= =?us-ascii?Q?puiFp4+WCd9KJ3XWw0f1YPrAEVB19Zra8BHgHDT3BjeSR/zAyZB574UjUo9B?= =?us-ascii?Q?YPzOxgSnEzs9Q7Mx7I5dpC2aGCMCnyKTIwlCv8WtXM6AKr+o8Px5fpyYLeLp?= =?us-ascii?Q?pxzJF2rH3wDSRQhDFg4TUCLRB9EDVoRQ9QwDsW3maW912VSee+R3WjJnudtj?= =?us-ascii?Q?fmwV73RMcN3Lt+Hc4JJfGwIy6l5NKGEDwAXN2VAbJZhUsQTahqMHjJY/M0fJ?= =?us-ascii?Q?h4Q8BF1L1KTHgFgPJTm6GLMxDV/e6HzRRul7VesqneqGcSJlh7MglqD3YB4M?= =?us-ascii?Q?Y/UDIb3rfDXs5SDER4R6b9a0SkmxJQzVtjKlwWc7f9QJZF794qQ1BV5OGGFL?= =?us-ascii?Q?GFfT9+kvIc4YH7nOtpul0zFUGA98mUdAmyI/PjzkKV7LYeYUyP8kRTY3Fd57?= =?us-ascii?Q?6nJUS+tW9/BkU/vFzNg6vs77srk8WFAMpYbMjV2zIeq+9tqVHmOFIkzoMauM?= =?us-ascii?Q?EOXyx7FNxsH0OAX1CCXiaO3guRiIUO8YjnKIXF+EBebMaqZb3hH4Q8YkgT98?= =?us-ascii?Q?JvvfKpVYf1cnmj8BVr7wRoq556GDOH9HO1/mrh+wnguOqhB9FDwwGzskhu7x?= =?us-ascii?Q?EDyOW0abIEPmpud5tN8w/bkCdENaFeasw9b+kduoSjOlXIke2GQK5uC1otB1?= =?us-ascii?Q?x665EevBbbD6eCcVL75VJ1JmyICCrFOEfdV2qfNszg/rQ4LV39i0Va2DjYHm?= =?us-ascii?Q?QuRTfcGOgyQVu/7NXY5q/p1SJsv2hFwxyGoA7J2Pr4+UDA1uSfIy3I/v05qA?= =?us-ascii?Q?E1WBUbLDHhYmo5mMdm25TR+80MK6clWa7YVb6Ub08Cn+xahNAPNQTc4mci8V?= =?us-ascii?Q?nvqxapzXyyJawqvxtInFp/GY7rNndivSTWo2kNuUduoJcb3CXM4O4buVyK3q?= =?us-ascii?Q?+PoNuA5Z08C++GdT6//zctSOTS21RyXeu8Xs7hSD1fRUJNg7j8teS+pcGc72?= =?us-ascii?Q?6L6l0znEWw+bw3xw4bzqN6BAj/j9dkS8KBf1aHfU+c4/2bMNzTPbD/uoyn1E?= =?us-ascii?Q?GDAgoeVuqRJ7DDR17h7xAtdTdHB5lF3W3DvsaUuvA81MHcwl69M+WCktShQ8?= =?us-ascii?Q?zUHyek+jaOAyovKpAL39Fvhpc8=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2693; 6:F2rToFRy125IX17RWvihMFk7nyLxDNJA7t6xrjpBWfwWuVrAd1pMVmbpovPE5YS4h02nCXDj44X6slWxADo6AR7k4f085ZmrGWI+gw4G9VrLKC86v0iGMFCLd1jddPvUCR4u6ynzXTsAEvlYWhAwPISvduPNXJ5aQEhUzhfHTeotL4NglxEc8oMPZ+x42HPXkRhb75X2WWW1ZS89axrwzhnppjZPcVNtwPxhVmb0eBfoytK6ND64psOfE9HQH56quIR/5a7Fn+vdax0UOG7qfvhFzSFOIhYGcMaxVmeCBoUg8VAYkzM2e5w/JOS0V3xpxAkAvyVsegI/bpQ12o53EHWYe6lozXiUUL4ipp1ad2A=; 5:c8ArC3Ljl4e2Bqg0FQCnwVSplRzUnkF4a0O8sPkhcebgPS6+qwt2VghSPRNQNXwJ04HA+b5GwPbG3EAwv3WLkqsWW9j1E2sU3YllyRaBwqMY88rU9duzs0BM72pOFH/kO4MuEFMUgd9PqIEw/6BkbDrbKPLoOkovFWEr5HRWB1Q=; 24:ioUP7HcOIPHhzRzegXvtjvdM8M2dKn3sYpcUtSZMZUfXItjgfWq83OstBuCsnh5wENYDQjcacqECWlPL4lthiFSHzgx5dmqb9erYvUu/L88=; 7:9YoO/nG+a7krtTI/YPYwYbZBHpsEO+FQif3x1WDWGLocUoyQA6iErhx6rZdSYwLxW4FhbB0XLlsdnomZMBcoyhQoWdpWrumaDwZdeZ680IXDrQxV109wnY9G5Bm8+iqmzL2FNmJAaI8a1+392up6f1N6d1wWHUTNaUo8atTN/HU/Wc/j3mCUT1qj0NAQyGr4Rke3rqcBdAvJNpL3bpX/FU+rMdaVQ54z0POpIvD75MP7Gefwzke/HCA6kdZaKgAP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2017 13:39:00.6428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f7d8b21-09fb-452c-e12c-08d52dc08f98 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2693 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171117_053923_369527_EDFD1761 X-CRM114-Status: GOOD ( 16.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, stuyoder@gmail.com, roy.pledge@nxp.com, linux-kernel@vger.kernel.org, leoyang.li@nxp.com, bogdan.purcareata@nxp.com, linux-arm-kernel@lists.infradead.org, Laurentiu Tudor Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurentiu Tudor These WARN_ONs shouldn't trigger unless something went very wrong. Since the driver is in a stable state let's remove these debug WARN_ONs. Signed-off-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dprc-driver.c | 8 -------- drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 10 ---------- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 12 ------------ drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 - .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 3 --- drivers/staging/fsl-mc/bus/mc-io.c | 19 ------------------- 6 files changed, 53 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c index 06df528..d6a84dd 100644 --- a/drivers/staging/fsl-mc/bus/dprc-driver.c +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c @@ -39,8 +39,6 @@ static int __fsl_mc_device_remove_if_not_in_mc(struct device *dev, void *data) struct fsl_mc_child_objs *objs; struct fsl_mc_device *mc_dev; - WARN_ON(!dev); - WARN_ON(!data); mc_dev = to_fsl_mc_device(dev); objs = data; @@ -60,8 +58,6 @@ static int __fsl_mc_device_remove_if_not_in_mc(struct device *dev, void *data) static int __fsl_mc_device_remove(struct device *dev, void *data) { - WARN_ON(!dev); - WARN_ON(data); fsl_mc_device_remove(to_fsl_mc_device(dev)); return 0; } @@ -453,8 +449,6 @@ static int disable_dprc_irq(struct fsl_mc_device *mc_dev) int error; struct fsl_mc_io *mc_io = mc_dev->mc_io; - WARN_ON(mc_dev->obj_desc.irq_count != 1); - /* * Disable generation of interrupt, while we configure it: */ @@ -496,8 +490,6 @@ static int register_dprc_irq_handler(struct fsl_mc_device *mc_dev) int error; struct fsl_mc_device_irq *irq = mc_dev->irqs[0]; - WARN_ON(mc_dev->obj_desc.irq_count != 1); - /* * NOTE: devm_request_threaded_irq() invokes the device-specific * function that programs the MSI physically in the device diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c index 8ea3920..d472a85 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c @@ -199,7 +199,6 @@ int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus, struct fsl_mc_resource, node); if (!resource) { - WARN_ON(res_pool->free_count != 0); error = -ENXIO; dev_err(&mc_bus_dev->dev, "No more resources of type %s left\n", @@ -474,7 +473,6 @@ int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev) irqs[i] = to_fsl_mc_irq(resource); res_allocated_count++; - WARN_ON(irqs[i]->mc_dev); irqs[i]->mc_dev = mc_dev; irqs[i]->dev_irq_index = i; } @@ -516,7 +514,6 @@ void fsl_mc_free_irqs(struct fsl_mc_device *mc_dev) return; for (i = 0; i < irq_count; i++) { - WARN_ON(!irqs[i]->mc_dev); irqs[i]->mc_dev = NULL; fsl_mc_resource_free(&irqs[i]->resource); } @@ -553,17 +550,10 @@ static void fsl_mc_cleanup_resource_pool(struct fsl_mc_device *mc_bus_dev, &mc_bus->resource_pools[pool_type]; int free_count = 0; - WARN_ON(res_pool->type != pool_type); - WARN_ON(res_pool->free_count != res_pool->max_count); - list_for_each_entry_safe(resource, next, &res_pool->free_list, node) { free_count++; - WARN_ON(resource->type != res_pool->type); - WARN_ON(resource->parent_pool != res_pool); devm_kfree(&mc_bus_dev->dev, resource); } - - WARN_ON(free_count != res_pool->free_count); } void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev) diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c index 409f2b9..1c2fd8d 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c @@ -162,12 +162,7 @@ static int fsl_mc_driver_probe(struct device *dev) struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev); int error; - if (WARN_ON(!dev->driver)) - return -EINVAL; - mc_drv = to_fsl_mc_driver(dev->driver); - if (WARN_ON(!mc_drv->probe)) - return -EINVAL; error = mc_drv->probe(mc_dev); if (error < 0) { @@ -184,9 +179,6 @@ static int fsl_mc_driver_remove(struct device *dev) struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev); int error; - if (WARN_ON(!dev->driver)) - return -EINVAL; - error = mc_drv->remove(mc_dev); if (error < 0) { dev_err(dev, "%s failed: %d\n", __func__, error); @@ -352,8 +344,6 @@ static int translate_mc_addr(struct fsl_mc_device *mc_dev, struct fsl_mc *mc; fsl_mc_get_root_dprc(&mc_dev->dev, &root_dprc_dev); - if (WARN_ON(!root_dprc_dev)) - return -EINVAL; mc = dev_get_drvdata(root_dprc_dev->parent); if (mc->num_translation_ranges == 0) { @@ -401,7 +391,6 @@ static int fsl_mc_device_get_mmio_regions(struct fsl_mc_device *mc_dev, * type, as this object type is not supposed to have MMIO * regions */ - WARN_ON(true); return -EINVAL; } @@ -424,7 +413,6 @@ static int fsl_mc_device_get_mmio_regions(struct fsl_mc_device *mc_dev, goto error_cleanup_regions; } - WARN_ON(region_desc.size == 0); error = translate_mc_addr(mc_dev, mc_region_type, region_desc.base_offset, ®ions[i].start); diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c index f74a6f1..0ce6117 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c @@ -124,7 +124,6 @@ static void fsl_mc_msi_write_msg(struct irq_data *irq_data, struct fsl_mc_device_irq *mc_dev_irq = &mc_bus->irq_resources[msi_desc->fsl_mc.msi_index]; - WARN_ON(mc_dev_irq->msi_desc != msi_desc); msi_desc->msg = *msg; /* diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c index 123e4af..947378f 100644 --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c @@ -93,9 +93,6 @@ int __init its_fsl_mc_msi_init(void) continue; } - WARN_ON(mc_msi_domain->host_data != - &its_fsl_mc_msi_domain_info); - pr_info("fsl-mc MSI: %pOF domain created\n", np); } diff --git a/drivers/staging/fsl-mc/bus/mc-io.c b/drivers/staging/fsl-mc/bus/mc-io.c index f65c23c..5530856 100644 --- a/drivers/staging/fsl-mc/bus/mc-io.c +++ b/drivers/staging/fsl-mc/bus/mc-io.c @@ -68,12 +68,6 @@ static void fsl_mc_io_unset_dpmcp(struct fsl_mc_io *mc_io) int error; struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev; - if (WARN_ON(!dpmcp_dev)) - return; - - if (WARN_ON(dpmcp_dev->mc_io != mc_io)) - return; - error = dpmcp_close(mc_io, 0, dpmcp_dev->mc_handle); @@ -224,8 +218,6 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev, error = -EINVAL; dpmcp_dev = resource->data; - if (WARN_ON(!dpmcp_dev)) - goto error_cleanup_resource; if (dpmcp_dev->obj_desc.ver_major < DPMCP_MIN_VER_MAJOR || (dpmcp_dev->obj_desc.ver_major == DPMCP_MIN_VER_MAJOR && @@ -238,15 +230,9 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev, goto error_cleanup_resource; } - if (WARN_ON(dpmcp_dev->obj_desc.region_count == 0)) - goto error_cleanup_resource; - mc_portal_phys_addr = dpmcp_dev->regions[0].start; mc_portal_size = resource_size(dpmcp_dev->regions); - if (WARN_ON(mc_portal_size != mc_bus_dev->mc_io->portal_size)) - goto error_cleanup_resource; - error = fsl_create_mc_io(&mc_bus_dev->dev, mc_portal_phys_addr, mc_portal_size, dpmcp_dev, @@ -279,8 +265,6 @@ void fsl_mc_portal_free(struct fsl_mc_io *mc_io) * to have a DPMCP object associated with. */ dpmcp_dev = mc_io->dpmcp_dev; - if (WARN_ON(!dpmcp_dev)) - return; resource = dpmcp_dev->resource; if (WARN_ON(!resource || resource->type != FSL_MC_POOL_DPMCP)) @@ -304,9 +288,6 @@ int fsl_mc_portal_reset(struct fsl_mc_io *mc_io) int error; struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev; - if (WARN_ON(!dpmcp_dev)) - return -EINVAL; - error = dpmcp_reset(mc_io, 0, dpmcp_dev->mc_handle); if (error < 0) { dev_err(&dpmcp_dev->dev, "dpmcp_reset() failed: %d\n", error);