From patchwork Fri Aug 30 08:56:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 1155780 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46KYJ45tvZz9s5b for ; Fri, 30 Aug 2019 18:56:52 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="R76PAH1H"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="H5iKtlaz"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46KYJ43rjHzDr2w for ; Fri, 30 Aug 2019 18:56:52 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.26; helo=out2-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="R76PAH1H"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="H5iKtlaz"; dkim-atps=neutral Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46KYHB2L87zDqxL for ; Fri, 30 Aug 2019 18:56:05 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 21AF922083; Fri, 30 Aug 2019 04:56:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 30 Aug 2019 04:56:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=N+/xHfrW3aULX QCqVybged8XEa4ya5xZpQyzoYwgBTM=; b=R76PAH1H/iOqVCzosNZ0Fovw3S32a okmNERZlIdtujAwr6tLc/HAzJk2f6I66/zr/8TY4EojPCgmDXZ9UNeCR43XSB5c/ mHHS54XCqK+uD2ms/qeTlmpEMtK68luY7CvvwnSMc7EAw7A6jG7uQ9nVvK+6Zb2L iBsvLN+JfzoeomrrILPVNLyzOOh3vLqL8RPUmmuln9V2OW1zfsBQdieiwlwdGYdy G26MkyCUl7HaeYBUL3OQ5MzoJF/bV+bVO3ClStw0j+L5CFtCihnIOsmud4bQCbPy JurEYY5cUcuf6LKb2qSRoiYwHLB8oWOCRVzqdQB8Tkt0Bp6rrAoJ3QyqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=N+/xHfrW3aULXQCqVybged8XEa4ya5xZpQyzoYwgBTM=; b=H5iKtlaz Mvzyh9emvEBjZpLTEKW7MBvp5ibNp6RquC3pPy/dcM0MSTOIDUKBmpNmOXcXI60b eqJuI+r9spmW/FTp+t95G9uES9g04EPrXBOTGDwWnUNHSogmVwiftuM5c136y98B gYSFTw76euPKOwXHGZESK2R03iMtYxTr+tdoNGN1gUAne4cEpMCws6lB4kD0XdvF CsWPfii9MoM72iWIgTcSX8FN1pCarERK7I3AQt2Ypi1bYVaeYiFSsxqYstIgiuLD dBtKhhqRY8zo3ct96+se0i6UyaqkAcKz+91jOGLUio2t/AFqpVN2SBw75lbTn+7x 5OdYa9HciQ/RSA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudeigedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetnhgurhgv ficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucfkphepvddtfe drheejrddvudehrddujeeknecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfies rghjrdhiugdrrghunecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost.localdomain (203-57-215-178.dyn.iinet.net.au [203.57.215.178]) by mail.messagingengine.com (Postfix) with ESMTPA id 97D118005C; Fri, 30 Aug 2019 04:56:00 -0400 (EDT) From: Andrew Jeffery To: openbmc@lists.ozlabs.org Subject: [PATCH linux dev-5.2 1/5] mmc: sdhci-of-aspeed: Fix return value check in aspeed_sdc_probe() Date: Fri, 30 Aug 2019 18:26:28 +0930 Message-Id: <20190830085632.12928-2-andrew@aj.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190830085632.12928-1-andrew@aj.id.au> References: <20190830085632.12928-1-andrew@aj.id.au> MIME-Version: 1.0 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Ulf Hansson , Wei Yongjun Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" From: Wei Yongjun In case of error, the function of_platform_device_create() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun Reviewed-by: Andrew Jeffery Signed-off-by: Ulf Hansson (cherry picked from commit 7b7de08a14b59d45cc4720bfb21732063ccfc8f6) Signed-off-by: Andrew Jeffery --- drivers/mmc/host/sdhci-of-aspeed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index 8bb095ca2fa9..d5acb5afc50f 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -261,9 +261,9 @@ static int aspeed_sdc_probe(struct platform_device *pdev) struct platform_device *cpdev; cpdev = of_platform_device_create(child, NULL, &pdev->dev); - if (IS_ERR(cpdev)) { + if (!cpdev) { of_node_put(child); - ret = PTR_ERR(cpdev); + ret = -ENODEV; goto err_clk; } } From patchwork Fri Aug 30 08:56:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 1155781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46KYK730n7z9s5b for ; Fri, 30 Aug 2019 18:57:47 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="TPM7Pe4t"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Bkyifkoq"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46KYK70NK2zDqxs for ; Fri, 30 Aug 2019 18:57:47 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.26; helo=out2-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="TPM7Pe4t"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Bkyifkoq"; dkim-atps=neutral Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46KYHC5YY7zDqxZ for ; Fri, 30 Aug 2019 18:56:07 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 35642220AF; Fri, 30 Aug 2019 04:56:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 30 Aug 2019 04:56:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=qgxOet6Vexw+I T/mOjeCHK3/miy/vj59++UWzoy9f4w=; b=TPM7Pe4tFsC4IDIIRrlFeyxTCUoJx U8sG47Bh9HRqT+CmnlIhPMAOc6X+WVTGwEWIkKWrLUQGw+qxUP85jNA1mZosFduo cwfmIiBeRfbGizyPDpNmDauyoYPRMRbKBvXYXNvHxCMh7+ia8x9O0i5VHxhmcorl 0lI/32WCAuwAiP+5LFzQ3vYWMep0uazOAiaINQEDGla4mxTGRLW2RcdMyHKf7B39 RjTbTFKc3NIbnRZNNcaSal1SNYHDCWQqLLmVITJgcQgnPUPbVYvOc6lLNK8ma272 W8B9tG1b7B3ghNbpoTPKyCmRD+DYpOOj1TeBYvEmoMbtDdEhHDjiSPR7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=qgxOet6Vexw+IT/mOjeCHK3/miy/vj59++UWzoy9f4w=; b=Bkyifkoq Lcvu2eB/T+QbksMH5CjgdU1N8BMMPoG7bYrPIJ3Q9n57cxegrjUE5oN3D443Av0F nAwaPD6fULaQclumcwp+BR3Eihtk0zfWWndXjE8VmHuak+eVUtor53HwMcun/Jeo UddGAwRr+MonYW9RYJbMWMBCjZ7pyIMsFyTuLyxWMZnWvHFKTR8FmXXr1dCk4mBA 0876h8WZQdVoJwb6n6m+Qpk7wm8gMpn0Gq2N0e98bE8b2TwmB5lciNjLTJ/328Md 9I/8mMLLgvMu/gTJ3p7Ge5+EZwB8N8j9iuvLjQk55EH4BkXuW9ys5AfJAMq7FFPC ta9uVvOFYmUNMw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudeigedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetnhgurhgv ficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucfkphepvddtfe drheejrddvudehrddujeeknecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfies rghjrdhiugdrrghunecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost.localdomain (203-57-215-178.dyn.iinet.net.au [203.57.215.178]) by mail.messagingengine.com (Postfix) with ESMTPA id 44D958005C; Fri, 30 Aug 2019 04:56:02 -0400 (EDT) From: Andrew Jeffery To: openbmc@lists.ozlabs.org Subject: [PATCH linux dev-5.2 2/5] mmc: sdhci-of-aspeed: Drop redundant assignment to host->clock Date: Fri, 30 Aug 2019 18:26:29 +0930 Message-Id: <20190830085632.12928-3-andrew@aj.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190830085632.12928-1-andrew@aj.id.au> References: <20190830085632.12928-1-andrew@aj.id.au> MIME-Version: 1.0 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Ulf Hansson Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" host->clock is already managed by sdhci_set_ios(). Suggested-by: Ulf Hansson Signed-off-by: Andrew Jeffery --- drivers/mmc/host/sdhci-of-aspeed.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index d5acb5afc50f..6ae81c8af431 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -61,7 +61,7 @@ static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock) sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); if (clock == 0) - goto out; + return; for (div = 1; div < 256; div *= 2) { if ((host->max_clk / div) <= clock) @@ -72,9 +72,6 @@ static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock) clk = div << SDHCI_DIVIDER_SHIFT; sdhci_enable_clk(host, clk); - -out: - host->clock = clock; } static void aspeed_sdhci_set_bus_width(struct sdhci_host *host, int width)