Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2462881rdb; Fri, 8 Dec 2023 08:48:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyOkJLtpqePWw4uqQWKBGqyn+sk4VQJpFDoKY40bVaDooc5nknqPseNQAwX3gyCPUBJtFW X-Received: by 2002:a17:902:8a88:b0:1d0:6ffd:cebf with SMTP id p8-20020a1709028a8800b001d06ffdcebfmr289024plo.120.1702054123215; Fri, 08 Dec 2023 08:48:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702054123; cv=none; d=google.com; s=arc-20160816; b=PG60uwrlKQYqnF6SxKxDEEpb1bvItYI9D0XrKqsYbYDOHlXNqG40qXXgiIHYmvAeaL MLU3ZoDFhu6EeBaO22t9j7n0Xb359kyet2cIvUazXDAqrLfkUv1pbAtp/nXWvSW8n6Ja 3qOJUW9ollYeGWDg1zEWBm8m6gwihG9yvSmNO6mD6ohlLUYH0jwfUKhCG7HcHpHo4IWX EaVeLdDZMzj6Zflm3VgK1rolzy3MjClkOu3VZJhTdWWrlGE2Rekoo1/UiZy0lqjNWD10 gwObaP9LknWcurDiFz7o+r+UG5MlqI6DbBoun0Ky/wlL6Z1cO7cY00tE+R7uaYXoAOpv ULpw== 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 :dkim-signature; bh=5dNPirvASkdcY7pOymXDVq0mD0jqbY8yDoyX0nISUyg=; fh=YfYU9X+v76cT4jgG+11baBs7gwlZmx0RvL1Jhbd06gw=; b=BV8pS5rR+efKysmRj852xN9a1G2RJ0E/l3Brpil5k3EG4DS03+TepqCr6Ord1hHeLL ZNFWcFXFDl9ULXRk/cY6E7MQZ4L2O3+w9TeHQwBAQULJwZefYoSq5BipN588PVfXU2Ql 5yAMx6qqUG4UhNDeMREkcIRqDsbAYY6BAeOTtcEEexMf9Tj7lKjNt3sYGhG9InYYGiCH FPt/I2QIcatERJ9JuvqiLquebCz9qCOHo7aXr2RKJygVxtf0HMwCLr3v7qMFJrOnAT4C +N/Na9Dg2GGbyAG3YcrR0paV2QNP4Zoz5nTEFMTMbmgljqP40dzcGNiC5U3DZSMUG4no 8Vvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=utfM1lWd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d1-20020a170902aa8100b001ca7308e42fsi1761497plr.631.2023.12.08.08.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 08:48:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=utfM1lWd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A90C781906A5; Fri, 8 Dec 2023 08:48:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573811AbjLHQsM (ORCPT + 99 others); Fri, 8 Dec 2023 11:48:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233678AbjLHQsA (ORCPT ); Fri, 8 Dec 2023 11:48:00 -0500 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F0F0198C; Fri, 8 Dec 2023 08:48:06 -0800 (PST) Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3B8GBAPi008023; Fri, 8 Dec 2023 17:47:56 +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=5dNPirvASkdcY7pOymXDVq0mD0jqbY8yDoyX0nISUyg=; b=ut fM1lWd/LM2IYHP0BS3cKcqWQ2Caqg1LOiW6ZpuI4XqE/I8EU7M5SvGhzvpK43YtY r2YeUT7LxCVghDJC+jB/+1DYE+ZrQvoZi8iwioFw66NbeZfl+Sei4UOTSao6R7ru QYPDHR8BXqMmhgLpc+lFZt46MEfhk4ROwm+Fm+GB7C5aZdN21evCUyzzYDj/gbdk z8oZ/ynWSbA1EkDYlfQMAzvcs3OBSf7p6eReQqSjKdRhbmFX2XcltG0Z0tDnP1QY gUi661tmaZIYevfrTwYwaCHUilbiWmzKUaXn+ngHe+tS0MldR5fRnvVoexH9W+lx 7673DnQY3Wi98lNNrv6g== 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 3utd2pnf16-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Dec 2023 17:47:56 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 55985100056; Fri, 8 Dec 2023 17:47:56 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4B851236932; Fri, 8 Dec 2023 17:47:56 +0100 (CET) Received: from localhost (10.129.178.213) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 8 Dec 2023 17:47:56 +0100 From: Alain Volmat To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Pierre-Yves MORDRET , Alain Volmat CC: Conor Dooley , Rob Herring , , , , , Subject: [PATCH v2 2/7] i2c: stm32f7: simplify status messages in case of errors Date: Fri, 8 Dec 2023 17:47:11 +0100 Message-ID: <20231208164719.3584028-3-alain.volmat@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231208164719.3584028-1-alain.volmat@foss.st.com> References: <20231208164719.3584028-1-alain.volmat@foss.st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.129.178.213] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_11,2023-12-07_01,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 08 Dec 2023 08:48:40 -0800 (PST) Avoid usage of __func__ when reporting an error message since dev_err/dev_dbg are already providing enough details to identify the source of the message. Signed-off-by: Alain Volmat --- drivers/i2c/busses/i2c-stm32f7.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c index 34dcc370e615..2a011deec3c5 100644 --- a/drivers/i2c/busses/i2c-stm32f7.c +++ b/drivers/i2c/busses/i2c-stm32f7.c @@ -1602,6 +1602,7 @@ static irqreturn_t stm32f7_i2c_isr_error_thread(int irq, void *data) { struct stm32f7_i2c_dev *i2c_dev = data; struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; + u16 addr = f7_msg->addr; void __iomem *base = i2c_dev->base; struct device *dev = i2c_dev->dev; struct stm32_i2c_dma *dma = i2c_dev->dma; @@ -1611,8 +1612,7 @@ static irqreturn_t stm32f7_i2c_isr_error_thread(int irq, void *data) /* Bus error */ if (status & STM32F7_I2C_ISR_BERR) { - dev_err(dev, "<%s>: Bus error accessing addr 0x%x\n", - __func__, f7_msg->addr); + dev_err(dev, "Bus error accessing addr 0x%x\n", addr); writel_relaxed(STM32F7_I2C_ICR_BERRCF, base + STM32F7_I2C_ICR); stm32f7_i2c_release_bus(&i2c_dev->adap); f7_msg->result = -EIO; @@ -1620,21 +1620,19 @@ static irqreturn_t stm32f7_i2c_isr_error_thread(int irq, void *data) /* Arbitration loss */ if (status & STM32F7_I2C_ISR_ARLO) { - dev_dbg(dev, "<%s>: Arbitration loss accessing addr 0x%x\n", - __func__, f7_msg->addr); + dev_dbg(dev, "Arbitration loss accessing addr 0x%x\n", addr); writel_relaxed(STM32F7_I2C_ICR_ARLOCF, base + STM32F7_I2C_ICR); f7_msg->result = -EAGAIN; } if (status & STM32F7_I2C_ISR_PECERR) { - dev_err(dev, "<%s>: PEC error in reception accessing addr 0x%x\n", - __func__, f7_msg->addr); + dev_err(dev, "PEC error in reception accessing addr 0x%x\n", addr); writel_relaxed(STM32F7_I2C_ICR_PECCF, base + STM32F7_I2C_ICR); f7_msg->result = -EINVAL; } if (status & STM32F7_I2C_ISR_ALERT) { - dev_dbg(dev, "<%s>: SMBus alert received\n", __func__); + dev_dbg(dev, "SMBus alert received\n"); writel_relaxed(STM32F7_I2C_ICR_ALERTCF, base + STM32F7_I2C_ICR); i2c_handle_smbus_alert(i2c_dev->alert->ara); return IRQ_HANDLED; -- 2.25.1