From patchwork Wed Dec 1 11:47:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 12694296 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7811C433F5 for ; Wed, 1 Dec 2021 11:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NWW8v8pUZ6PZpZBNBLp3tDKWXKwQLU3lhNfANyY1tXM=; b=N5jMLzcyXlNCQr 2aIDnPls/a9V9zO5XAh0vV7TMoft1d0zAkCh9EcZc02P+fmieSR44d3fp03h6rwZ5m3LCoAzZyQ7y i8dAqZ1p3YYrLtouMW+XL35sb0Onuzl/1vUKLtCI6yaH0eOb5+tpugVY2XWj/GHgc0501gPQCKuGi 7xNKa5NMwSeqZuxN1nD/lujDj8+/lzpddzWncWm7GAMx57nmFoCpgs6ObiAj05HbBGx1lH+cK5gfX SFzAUyvE4QCbYrdl4hmCe5424KH2qj2nqe9vSp5c9bMhZy8jOM5rbI0u1Kb8hTji2QYKVVf5PY1Fh c25+Tt3/jBzOnjlBF/XA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msO6N-008Fzu-7l; Wed, 01 Dec 2021 11:48:43 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msO68-008Fv0-Ec for linux-arm-kernel@lists.infradead.org; Wed, 01 Dec 2021 11:48:30 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1B19D5HL028937; Wed, 1 Dec 2021 12:48:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=7odZAZhCVgaOiJipJ40jrarQIFv9heW0d1vSNIFNSZg=; b=dvAmKLFUsRSFG3HDFoPaVZgFIDHJWGRG6r32XKpk7/2v7PYQ6CiD43uYb1aY7WmxZiSM ugcLlTGzD6aNhd98Y7EPDKzmA57TeV+9w/Bfrlxb3SeJ4Oxlk33M6wJEIIN8WSn4cNpP yujhr8JM8JYlIYWfMDfVoIlv61G/plvcqdUx+YC93eeFHH1kXJ3ZCfQ5XjeXk2z1ATyy 4BL8m2daiHffWNfkzuia7DOpCTtCUOBii1t36dU3QoH6hkqXTptvNf46YGGtnvOI7x5K mhSQ1AS/soB2MA7hiS7SN6VAAL2KcGn5dlAiPGHCFe/J2O5U+0bO0jOhvohehztdZ25R kg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3cp67m921x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Dec 2021 12:48:12 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 44E71100039; Wed, 1 Dec 2021 12:48:11 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 3EBD82194D5; Wed, 1 Dec 2021 12:48:11 +0100 (CET) Received: from localhost (10.75.127.50) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Wed, 1 Dec 2021 12:48:10 +0100 From: Alain Volmat To: , CC: , , , , , , , Subject: [PATCH 1/2] i2c: stm32: get rid of stm32f7_i2c_release_bus return value Date: Wed, 1 Dec 2021 12:47:50 +0100 Message-ID: <20211201114751.828474-2-alain.volmat@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211201114751.828474-1-alain.volmat@foss.st.com> References: <20211201114751.828474-1-alain.volmat@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-30_10,2021-12-01_01,2020-04-07_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211201_034828_800784_CE3F0E89 X-CRM114-Status: GOOD ( 16.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Function stm32f7_i2c_release_bus is always returning 0, hence it should be a void function. Update the function and remove the return value error checking code in caller functions. Signed-off-by: Alain Volmat --- drivers/i2c/busses/i2c-stm32f7.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c index 66145d2b9b55..fcf43b3ac64f 100644 --- a/drivers/i2c/busses/i2c-stm32f7.c +++ b/drivers/i2c/busses/i2c-stm32f7.c @@ -828,7 +828,7 @@ static void stm32f7_i2c_smbus_reload(struct stm32f7_i2c_dev *i2c_dev) writel_relaxed(cr2, i2c_dev->base + STM32F7_I2C_CR2); } -static int stm32f7_i2c_release_bus(struct i2c_adapter *i2c_adap) +static void stm32f7_i2c_release_bus(struct i2c_adapter *i2c_adap) { struct stm32f7_i2c_dev *i2c_dev = i2c_get_adapdata(i2c_adap); @@ -838,8 +838,6 @@ static int stm32f7_i2c_release_bus(struct i2c_adapter *i2c_adap) STM32F7_I2C_CR1_PE); stm32f7_i2c_hw_config(i2c_dev); - - return 0; } static int stm32f7_i2c_wait_free_bus(struct stm32f7_i2c_dev *i2c_dev) @@ -856,11 +854,7 @@ static int stm32f7_i2c_wait_free_bus(struct stm32f7_i2c_dev *i2c_dev) dev_info(i2c_dev->dev, "bus busy\n"); - ret = stm32f7_i2c_release_bus(&i2c_dev->adap); - if (ret) { - dev_err(i2c_dev->dev, "Failed to recover the bus (%d)\n", ret); - return ret; - } + stm32f7_i2c_release_bus(&i2c_dev->adap); return -EBUSY; }