Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6821454rdb; Fri, 15 Dec 2023 09:08:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHE1H/rAbYtnH3yD5EXwrC39k7pUFmq8u4aRvdlT8KY7mAHqzrm6rxWUAmgqiG5HevXVz4H X-Received: by 2002:a05:6a00:4b47:b0:6cd:d312:b767 with SMTP id kr7-20020a056a004b4700b006cdd312b767mr13014227pfb.6.1702660135135; Fri, 15 Dec 2023 09:08:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702660135; cv=none; d=google.com; s=arc-20160816; b=RscwVsezMZNaiAErAq8Ov2ZzLh88xmjp/BYdD+Rmy1gXpQInSAgwafcmuJGaU3RaOh 0MaSdhkXn9xNTphUrwmaSttb3CiFwwRfQzm1mtyVhrLQnTdXwTjqjEh3p7VesSLlh62U 96TT5ia1b+A2Lz7DEN/q+2/KJChhiZGSp8F1lV1M1bSq/00u7teI/yoh1Yo4Gdeg4pvs HdNpk8Kj91TLlBX29klcmngtn2OmnTVX2xmC3ZOD0mW9CiZBmWdSlfpXO1/AXE5T31GY r4PeRbXU98hdx5vrEBL6zGumuTls2rbJdvnaFbtLUnhna00XXtcmFkh50Cibpg37cp26 dP6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8Q6fsKuOMujbUWL8S4D1FNyuTRmT2Niautvq9U6Ik2A=; fh=7H+u7I0bdEALWzYaVOAO2NvJkKF7hcf2wW1/JO41DU8=; b=IU5RLgmran8Iw9GTWWFqQaNFZmYYOL3XC+7SdgzxojVf/GHWvetocx3BG8oIZErCYJ WdQkRF7q8ENTe57AdivoWW7DgFhdFZgTMQsy7lJQ8QT4ojyO7v19X2KHi17J3SYdOqVc iv32SUv+3YTIrXcZvoyxA1KVDHnZJP1MHBqQKCZettqEgEIajzbBjhyRHDOeo6fIhg5p HwiZARU6fGX06y7I7HSF8x9conCVR8YWFzWyA8LKoH3sV+wbAgMbZ3Kd5CRopStKdUHy 98RLKWu8m8GS1of3vCs1+yIuLUdinpcw/QYa+XjhB6qpjofudQx4ymJ+3iBXpIopOF8u Xtww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Fmy6Jpf1; spf=pass (google.com: domain of linux-kernel+bounces-1358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1358-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i23-20020aa78d97000000b006933caa6f03si12932460pfr.165.2023.12.15.09.08.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 09:08:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Fmy6Jpf1; spf=pass (google.com: domain of linux-kernel+bounces-1358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1358-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C1DB528559E for ; Fri, 15 Dec 2023 17:08:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81EC03FE44; Fri, 15 Dec 2023 17:08:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="Fmy6Jpf1" X-Original-To: linux-kernel@vger.kernel.org Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BC4C4597E; Fri, 15 Dec 2023 17:08:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com 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 3BFDKYTL017154; Fri, 15 Dec 2023 18:07:52 +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=8Q6fsKuOMujbUWL8S4D1FNyuTRmT2Niautvq9U6Ik2A=; b=Fm y6Jpf1Y/1klijI7osvRDlOy+0sOlWoipTYTpG98KBhVKf4kx95SMfjBrPNnkXgwM aXNThrcZCGRbUvepiqlNXned27z6rbg6vUxfYSZX11TUyBX8nEW8jFM0uPqll/D/ D2PMZM64bAOhqdT4mFsYK8Hg0PkM5NqnS7+AWlGkCI+xTYq6T3ff//v+iJm8pZdD HZ3WIhebVH8G4wIpV+cBAof7tMJw6vkyb+XQmTDwffSPGjoQ3ze4jiQxRtF6N4RS Yheu4B2RYrgJRAfqNBhbLM/04ybcIUoi4JedjpY4YaoY1ivNcWyb7cPT/XtX2leU Fog8/ArI7MR9EqOKju0w== 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 3v0cbtuhyw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Dec 2023 18:07:52 +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 6C321100052; Fri, 15 Dec 2023 18:07:51 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 63FD523BDFD; Fri, 15 Dec 2023 18:07:51 +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, 15 Dec 2023 18:07:51 +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 , , , , , Subject: [PATCH v3 3/9] i2c: stm32f7: simplify status messages in case of errors Date: Fri, 15 Dec 2023 18:06:07 +0100 Message-ID: <20231215170617.95868-4-alain.volmat@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231215170617.95868-1-alain.volmat@foss.st.com> References: <20231215170617.95868-1-alain.volmat@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-15_10,2023-12-14_01,2023-05-22_02 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 Reviewed-by: Andi Shyti --- 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 dde70e7ec722..15100fed0a3f 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