From patchwork Wed Feb 28 19:32:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 207984 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3565921dyb; Wed, 28 Feb 2024 11:33:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVAJkKPpCxG54dbYT6nNGnit4LzP+qmEetnELZPG5NnV3gCCAn8HTs/vhCGQ4sp9xaB3YHj3pxdza34Enoj7AmqRsyR3A== X-Google-Smtp-Source: AGHT+IHLWLSqt9UnLcPgVXmJtvQK/vhzULpMHLmsbgkAy6rpeRNR8veQBUpmDW8V+J/Yr9JDR8P0 X-Received: by 2002:a05:6a00:2290:b0:6e4:f4b4:9ea7 with SMTP id f16-20020a056a00229000b006e4f4b49ea7mr610309pfe.17.1709148813850; Wed, 28 Feb 2024 11:33:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709148813; cv=pass; d=google.com; s=arc-20160816; b=gnrY0nCX4vINhXoRfNJQflYBvgwT3jw/2rRWZCzJ1LzHPhrio6tazxUpdicXe/aqOu QX14Sx/E4WvRjcm/UGVqt91Ro5rWsunB+mXdgBmnoWppi42zk1OoJq/bO/X7sRgBBAw3 043CkTK/s9C8T9cHi/fQZk7lvIUXGCHvmuNlUQhi+COREHgZqXIvvAAZv4M+Luc+OYOS 3JaWcg/SmOIfuxlz+Wg3+NRG0Kv183SPssED130T/1SjNhkOy2b7Dsbvk9gTWrKCt1YW iZ5nc5RK8HilMajt9cm2btNyYjIPQXGg4YPhax2efMyv3ez9cgEuUvvy22SfphNiw9+j 2Z7Q== ARC-Message-Signature: i=2; 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; bh=CA3afmuhGYmah4ER2+82I2gkmfSf/wPgZOwL6NAkeHs=; fh=bYNgxUv5aDVv8ODFnU81QVGUrcSfp9UeUM+wu8I0NkA=; b=Oz5E/1eb6sxXov6MS7T8RFdcT62lEiGUGFxakEuSBp2tGRa6IoBprVf5XhaXGSVUjh qWbzB06RNoyNiRpXfyBr3QPZnY5RF8b7j31G66/P5In9dYboduDpXCgGf4zS3WXSwyb1 NqSa22YtXQWA0yUgTtZj09RA4YOM1PFEmNkBi3zDU65aaYD5Tuw0pAMSezGnkItT0sxO RNCbbCh/n8KjCIH2ISwf6i0u2dmayTzPC3uEnxFKPtqifemhqJdzuge08R5w77Offi5U 9wdFQ0Tcg5pa0X/ZY5FbzDOoxY0wRVMFxmz96l/Z6Lo1+TWU31AfrXKfKapl99SL9jqL lxNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-85601-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85601-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o24-20020a63fb18000000b005dc956c2c09si168113pgh.147.2024.02.28.11.33.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:33:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85601-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-85601-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85601-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 419AD289FA3 for ; Wed, 28 Feb 2024 19:33:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B94471EB3; Wed, 28 Feb 2024 19:33:12 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 022D374413 for ; Wed, 28 Feb 2024 19:33:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148790; cv=none; b=aYnIN7Vem0ncIctMbc0e36gSL8JnP87NwHkCWD7yit5iYRBg4OfA+Xsm/Eky0ejBLsIBy+ebIwX9UQ135Oxjp47+Smik1Mt9l23oDY03mSwzjULvbJT4II81ky2yNCLoW+2NqNbOIVnac+EhOC97ZFtEQqnQecsVhg2v98IGM4I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148790; c=relaxed/simple; bh=7IGzCLQMLGkVRkVb5V5G0IQKCXdsrlywwviMolD2M04=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fh0Z6Zf2ZNeL3OygjcgpT+o2FNxcEy4+oWh6oJbxAOOQWERWvJqGq1+Y83YUFLhbcdlGzsxQ/z8+Q158O3CzSxl/JF6nrMBNOzZDj/Qtfyw9JhC8FcBXw5ARrPTkG+kRv4Ud/7doPDYrQqG6WyIaW2bBnYweyBVTQ5ts88emNRk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4E139DA7; Wed, 28 Feb 2024 11:33:46 -0800 (PST) Received: from pluto.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AE5693F73F; Wed, 28 Feb 2024 11:33:05 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, peng.fan@oss.nxp.com, michal.simek@amd.com, quic_sibis@quicinc.com, quic_nkela@quicinc.com, Cristian Marussi Subject: [PATCH 1/4] include: trace: Widen the tag buffer in trace_scmi_dump_msg Date: Wed, 28 Feb 2024 19:32:35 +0000 Message-ID: <20240228193238.2102157-2-cristian.marussi@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240228193238.2102157-1-cristian.marussi@arm.com> References: <20240228193238.2102157-1-cristian.marussi@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792172427134799487 X-GMAIL-MSGID: 1792172427134799487 A bigger buffer allow for more diverse tag names. Signed-off-by: Cristian Marussi --- include/trace/events/scmi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/trace/events/scmi.h b/include/trace/events/scmi.h index 422c1ad9484d..3be75752c56f 100644 --- a/include/trace/events/scmi.h +++ b/include/trace/events/scmi.h @@ -150,7 +150,7 @@ TRACE_EVENT(scmi_msg_dump, __field(u8, channel_id) __field(u8, protocol_id) __field(u8, msg_id) - __array(char, tag, 5) + __array(char, tag, 7) __field(u16, seq) __field(int, status) __field(size_t, len) @@ -162,7 +162,7 @@ TRACE_EVENT(scmi_msg_dump, __entry->channel_id = channel_id; __entry->protocol_id = protocol_id; __entry->msg_id = msg_id; - strscpy(__entry->tag, tag, 5); + strscpy(__entry->tag, tag, 7); __entry->seq = seq; __entry->status = status; __entry->len = len; From patchwork Wed Feb 28 19:32:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 207985 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3566044dyb; Wed, 28 Feb 2024 11:33:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVqGYYRwpFYqZKPuC8UG9s4CaomrDMx08RDfP/0pRU43sOR9rziwCzfeHBQv2uB/jfinKV+N4RbJUM801VxwMyEv84lmA== X-Google-Smtp-Source: AGHT+IH0i9LbcjRVNs0lh27u6ah5D3vgdmAsbMCrhxA40gXFkXvcHgd6HKDBi3EVWSIjai95KjdU X-Received: by 2002:a17:902:ce82:b0:1db:e837:409a with SMTP id f2-20020a170902ce8200b001dbe837409amr543927plg.48.1709148830106; Wed, 28 Feb 2024 11:33:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709148830; cv=pass; d=google.com; s=arc-20160816; b=a87wMlzi7hFFK2FYusJ6H833rMIhGNVV8u4r/sJQa0Uu2v0HR++u8sDiPQbGxeM35k LCFF4YfmrD9/1UEr3ENZMVu3UW2C0plLVJOyx5cO0/4qrUJnZSgFbEn4+zcac85DSjsr W1Y/BB16yeqHwWJFumWuQb4kW7oC/9PrDwo0JXvt0VBTAKtn0pMskJh5SDwGd6Jxmqu7 CC87nfQ614FZDNPzmSEcYIYLtHUUz7Schtkg04NrsinUbGUxl2e6LiL1nm34jN3ly5qU zrrxx5ozh+x2vgpGXtFEsAO1nZwbKXs4j8ieEQzqppiS0Xcfc0jQtr9Oyy0WPgFT/Wu9 fxjg== ARC-Message-Signature: i=2; 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; bh=s4gFmOyiyvb3N3OOsgjBEx/ksnG0DaR/8sgCqffVTDM=; fh=bYNgxUv5aDVv8ODFnU81QVGUrcSfp9UeUM+wu8I0NkA=; b=YxDyWnYIyePziymTc0opdQLu8pjS2EHK7HSAs5tEU4EhtC8qBv1baNkoqX48Ox0KiV oHw8Oo2WbtZDlfv92vKUQVbQ3lr/azTogppuSXl0jz9DMW8nwJjFYPFfmH8UicUfmSP/ G+FBdDewpEYukNlxGDWr1wNIXefSiNhCS9jTZBDCvauGwTE2LfUJ/USvSGaAbAG+71qa fWgVsYnBhjJY6Gc+EPDQru1+WFdj+nYzOqhBOkpAICQ4O1heBjxPdrhLqySMaIOgZF8r e1QBK9eQ9J4f0ZKEAwtP5B4QEufvO3PLPNc1TzxWzXBJ4rA0eVEoorDvtdlX3sP9EejY haPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-85602-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85602-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w16-20020a1709027b9000b001dcb18cd298si3875821pll.74.2024.02.28.11.33.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:33:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85602-ouuuleilei=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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-85602-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85602-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 E139628A4CF for ; Wed, 28 Feb 2024 19:33:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E57715F319; Wed, 28 Feb 2024 19:33:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B3E67D406 for ; Wed, 28 Feb 2024 19:33:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148793; cv=none; b=D8EZ3tyXQhQEOn/LOYdjvlmONhwjZ9uiQjqYh9qCS63XN7eyVw5Px7e20L/ilEksLAqCYXZk23ME/aZmV9Qbi5okmcM8lKjm2YA7j2+jda8WxChEcqOolWe9yeT19ZOui9ZSup246vIlaflnRtHKfk7kuJXMuTTr2zUnUGq08RM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148793; c=relaxed/simple; bh=AoB8v9iRXv+R1wRD6aDoHrJAOehVSVKk6EBz1WgbNTM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oKHezASKmKfZhfXMeYTkj0jYsBnjZuNMaw0dSaaS9XCVf8bfjYJZN1vhZ/esJ13vWg6Emj452j10ly5uQXfAv56oEac96YDUzSbAMYHQ9Ot1kM0E5Egmujxz07G60TXCsWyMI5cHCUOM0+P6FH9X41ZPpV5piR0ddsUHwSSL4Iw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1F4801007; Wed, 28 Feb 2024 11:33:48 -0800 (PST) Received: from pluto.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7F8933F73F; Wed, 28 Feb 2024 11:33:07 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, peng.fan@oss.nxp.com, michal.simek@amd.com, quic_sibis@quicinc.com, quic_nkela@quicinc.com, Cristian Marussi Subject: [PATCH 2/4] firmware: arm_scmi: Add message dump traces for bad and unexpected replies Date: Wed, 28 Feb 2024 19:32:36 +0000 Message-ID: <20240228193238.2102157-3-cristian.marussi@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240228193238.2102157-1-cristian.marussi@arm.com> References: <20240228193238.2102157-1-cristian.marussi@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792172443574429898 X-GMAIL-MSGID: 1792172443574429898 Use trace_scmi_msg_dump also to account for late-timed-out, out-of-order and unexpected replies. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/driver.c | 36 +++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 34d77802c990..a3182199f123 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -822,6 +822,13 @@ scmi_xfer_command_acquire(struct scmi_chan_info *cinfo, u32 msg_hdr) "Message for %d type %d is not expected!\n", xfer_id, msg_type); spin_unlock_irqrestore(&minfo->xfer_lock, flags); + + trace_scmi_msg_dump(info->id, cinfo->id, + MSG_XTRACT_PROT_ID(msg_hdr), + MSG_XTRACT_ID(msg_hdr), + !msg_type ? "_!RESP" : "_!DLYD", + xfer_id, 0, NULL, 0); + return xfer; } refcount_inc(&xfer->users); @@ -846,6 +853,13 @@ scmi_xfer_command_acquire(struct scmi_chan_info *cinfo, u32 msg_hdr) dev_err(cinfo->dev, "Invalid message type:%d for %d - HDR:0x%X state:%d\n", msg_type, xfer_id, msg_hdr, xfer->state); + + trace_scmi_msg_dump(info->id, cinfo->id, + MSG_XTRACT_PROT_ID(msg_hdr), + MSG_XTRACT_ID(msg_hdr), + !msg_type ? "_!RESP" : "_!DLYD", + xfer_id, 0, NULL, 0); + /* On error the refcount incremented above has to be dropped */ __scmi_xfer_put(minfo, xfer); xfer = ERR_PTR(-EINVAL); @@ -882,6 +896,12 @@ static void scmi_handle_notification(struct scmi_chan_info *cinfo, if (IS_ERR(xfer)) { dev_err(dev, "failed to get free message slot (%ld)\n", PTR_ERR(xfer)); + + trace_scmi_msg_dump(info->id, cinfo->id, + MSG_XTRACT_PROT_ID(msg_hdr), + MSG_XTRACT_ID(msg_hdr), "_!NOTI", + MSG_XTRACT_TOKEN(msg_hdr), 0, NULL, 0); + scmi_clear_channel(info, cinfo); return; } @@ -923,10 +943,18 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo, xfer = scmi_xfer_command_acquire(cinfo, msg_hdr); if (IS_ERR(xfer)) { + u8 msg_type = MSG_XTRACT_TYPE(msg_hdr); + + trace_scmi_msg_dump(info->id, cinfo->id, + MSG_XTRACT_PROT_ID(msg_hdr), + MSG_XTRACT_ID(msg_hdr), + !msg_type ? "_!RESP" : "_!DLYD", + MSG_XTRACT_TOKEN(msg_hdr), 0, NULL, 0); + if (IS_ENABLED(CONFIG_ARM_SCMI_RAW_MODE_SUPPORT)) scmi_raw_error_report(info->raw, cinfo, msg_hdr, priv); - if (MSG_XTRACT_TYPE(msg_hdr) == MSG_TYPE_DELAYED_RESP) + if (msg_type == MSG_TYPE_DELAYED_RESP) scmi_clear_channel(info, cinfo); return; } @@ -990,6 +1018,7 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo, void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr, void *priv) { u8 msg_type = MSG_XTRACT_TYPE(msg_hdr); + struct scmi_info *info = handle_to_scmi_info(cinfo->handle); switch (msg_type) { case MSG_TYPE_NOTIFICATION: @@ -1001,6 +1030,11 @@ void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr, void *priv) break; default: WARN_ONCE(1, "received unknown msg_type:%d\n", msg_type); + trace_scmi_msg_dump(info->id, cinfo->id, + MSG_XTRACT_PROT_ID(msg_hdr), + MSG_XTRACT_ID(msg_hdr), "_!UNKN", + MSG_XTRACT_TOKEN(msg_hdr), 0, NULL, 0); + break; } } From patchwork Wed Feb 28 19:32:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 207986 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3566147dyb; Wed, 28 Feb 2024 11:34:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUp6esYewrW266g3kiw1uABCh82pgAcX+BrQh9znocBu9hT87EHM78+R34Ay+/nbbwaCNoudrz8DGb/kG+U7ZRzW7mYqA== X-Google-Smtp-Source: AGHT+IHafkk2eCIhmZVdvj0F1mlauLihQxHOyD/YCRHYWeXUMTVYU+VYgv0knCSQO8aNgcnsSVe+ X-Received: by 2002:a05:6402:1350:b0:564:4f6f:a7ff with SMTP id y16-20020a056402135000b005644f6fa7ffmr253124edw.20.1709148841802; Wed, 28 Feb 2024 11:34:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709148841; cv=pass; d=google.com; s=arc-20160816; b=skSimiEMduegx10Co6UOyivg67xcPZJ3/fbnYrOrDl/JmVQLZxNEmyQfW8Z5Lxyp6x UKcBlCGHRxRr0tAM1WiWnIHPsnA4AYsXPgDKdrcrPjkr/H8wo3MLP33Ds+suw4hSnn1S 9v6Jz9fhJRHFsovbg0LzrANAZsh6lmdk9eazE5/20rDGhbFsbAe2iffs9lkP5SLb8qCq PLq4Ag/u2bQBFGnOxT5HDOvab8QshAGg44YSWWDn+998K/0mpgCQhdGBPFpcVY5Gx6Om VK1zV9ec7QLJPZ44qTQB4dxVAm+LpdJnYQfDzHEQRc2YIEmMFZJIBsGf+sUTxy/sXhNp MMQg== ARC-Message-Signature: i=2; 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; bh=9bBtdqZU69did2kAKCCWY2ZDwXXlO1B8hapvzVZTWrI=; fh=bYNgxUv5aDVv8ODFnU81QVGUrcSfp9UeUM+wu8I0NkA=; b=A7pFHuj8bv8VqekfsXbGWYCHlzWebBdlfZ++vGGV+lQKmhPei9EE+MMp1pTfiBb+AA 9eTWHpiJpAJdCuczjV1OkxwXq/KShComhKZHooY/K+8tahrfaf81C0xIP4Qkj0VsIJPS 2kVjpCXmZLIzJga++VV/xGbiGg4I1mDNjt1a6tj52ShhlMWCMKF/zecG4pVOe3aWemSp Pstk+rWCzGm+SSPiBnx6cS2UiT7Suu7FU14UCeQs+aYc2Ko5WNh3v2BmeDMRFoESvrI5 yY1frUp4Ptl3pUd6aTXmBnkdOtWlLhGJ+x/8qJBQA6uz+WfNn+TCSFHrg1vvjQt5/tbk nRkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-85603-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85603-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j18-20020a50d012000000b00565b361b03asi1903946edf.341.2024.02.28.11.34.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:34:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85603-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-85603-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85603-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6B05A1F25729 for ; Wed, 28 Feb 2024 19:34:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D071A160884; Wed, 28 Feb 2024 19:33:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AED9B15DBB9 for ; Wed, 28 Feb 2024 19:33:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148794; cv=none; b=ZbdAaQSkxMxhNS3mVHQ3fP0LsbpbqmKZkZH48l/UyhYLrTqQusEX/kF3z7y7tfyDs6I5htxsTdXdelEMbgnNd8GSHg+BO3bdlwBWwROmh1gT6WIkf/qCWxL0WXUgAyX6gTuFe9Gedke6Jpt9DTh0L7GQCncVdxC6RXGdh9Q5XL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148794; c=relaxed/simple; bh=R1HN6cNrtXWrVeHwA6L4bNTI2kbh4VCicV68kbU/F7c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SHubu61c2Zy9Y3dg00KlR5EvY/8oZQcCOVsIKJgsiHy7wpNL00ZKdVRaFzJakeUW54hOtK0kfj/Sj/n/M/eHDw17J7zxJNNxDBLrTL9M7VPyp9j5zb0yrpABjK3LUSsjB+yWT1csBJ5mh/AeKRiBzXNuZ1XycCds6Xqj/r5HDgQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E454CC15; Wed, 28 Feb 2024 11:33:49 -0800 (PST) Received: from pluto.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 510493F73F; Wed, 28 Feb 2024 11:33:09 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, peng.fan@oss.nxp.com, michal.simek@amd.com, quic_sibis@quicinc.com, quic_nkela@quicinc.com, Cristian Marussi Subject: [PATCH 3/4] firmware: arm_scmi: Simplify scmi_devm_notifier_unregister Date: Wed, 28 Feb 2024 19:32:37 +0000 Message-ID: <20240228193238.2102157-4-cristian.marussi@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240228193238.2102157-1-cristian.marussi@arm.com> References: <20240228193238.2102157-1-cristian.marussi@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792172456014636418 X-GMAIL-MSGID: 1792172456014636418 Unregistering SCMI notifications using the managed devres interface can be done providing as a reference simply the previously successfully registered notification block since it could have been registered only on one kernel notification_chain: drop any reference to SCMI protocol, events and sources. Devres internal helpers can search for the provided notification block reference and, once found, the associated devres object will already provide the above SCMI references for the event. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/notify.c | 30 ++++-------------------------- include/linux/scmi_protocol.h | 2 -- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c index 27c52531194d..e160ecb22948 100644 --- a/drivers/firmware/arm_scmi/notify.c +++ b/drivers/firmware/arm_scmi/notify.c @@ -1513,17 +1513,12 @@ static int scmi_devm_notifier_register(struct scmi_device *sdev, static int scmi_devm_notifier_match(struct device *dev, void *res, void *data) { struct scmi_notifier_devres *dres = res; - struct scmi_notifier_devres *xres = data; + struct notifier_block *nb = data; - if (WARN_ON(!dres || !xres)) + if (WARN_ON(!dres || !nb)) return 0; - return dres->proto_id == xres->proto_id && - dres->evt_id == xres->evt_id && - dres->nb == xres->nb && - ((!dres->src_id && !xres->src_id) || - (dres->src_id && xres->src_id && - dres->__src_id == xres->__src_id)); + return dres->nb == nb; } /** @@ -1531,10 +1526,6 @@ static int scmi_devm_notifier_match(struct device *dev, void *res, void *data) * notifier_block for an event * @sdev: A reference to an scmi_device whose embedded struct device is to * be used for devres accounting. - * @proto_id: Protocol ID - * @evt_id: Event ID - * @src_id: Source ID, when NULL register for events coming form ALL possible - * sources * @nb: A standard notifier block to register for the specified event * * Generic devres managed helper to explicitly un-register a notifier_block @@ -1544,25 +1535,12 @@ static int scmi_devm_notifier_match(struct device *dev, void *res, void *data) * Return: 0 on Success */ static int scmi_devm_notifier_unregister(struct scmi_device *sdev, - u8 proto_id, u8 evt_id, - const u32 *src_id, struct notifier_block *nb) { int ret; - struct scmi_notifier_devres dres; - - dres.handle = sdev->handle; - dres.proto_id = proto_id; - dres.evt_id = evt_id; - if (src_id) { - dres.__src_id = *src_id; - dres.src_id = &dres.__src_id; - } else { - dres.src_id = NULL; - } ret = devres_release(&sdev->dev, scmi_devm_release_notifier, - scmi_devm_notifier_match, &dres); + scmi_devm_notifier_match, nb); WARN_ON(ret); diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 2ee94ff0320c..305d89c02a94 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -775,8 +775,6 @@ struct scmi_notify_ops { const u32 *src_id, struct notifier_block *nb); int (*devm_event_notifier_unregister)(struct scmi_device *sdev, - u8 proto_id, u8 evt_id, - const u32 *src_id, struct notifier_block *nb); int (*event_notifier_register)(const struct scmi_handle *handle, u8 proto_id, u8 evt_id, From patchwork Wed Feb 28 19:32:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 207987 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3566204dyb; Wed, 28 Feb 2024 11:34:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWrYafDZ1YJi/g7D9AXF6AJHQE8CINlbbf1c6g2qY+Fr+OEL5FvxoyP0MflpJltoghOrx0XZ8PgGysyn4MPf3d0TbZm7A== X-Google-Smtp-Source: AGHT+IEWo+IEHoSRQU1oF0PQQ5Dl8TBMTVOiANreACb4hxP4ji0IGxyJRloP+KtCJX17LJbOlNwH X-Received: by 2002:a05:6a20:2d08:b0:1a1:e41:979b with SMTP id g8-20020a056a202d0800b001a10e41979bmr284601pzl.41.1709148848709; Wed, 28 Feb 2024 11:34:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709148848; cv=pass; d=google.com; s=arc-20160816; b=R46NyTbnsVlK1fQ9sbKHjp/ofQWjXG/MauDMuwALv96Qpkcqi/Tt0d+3MT/sQGIe2w oNrWziAQRdWwJ+mN9132Yhn26P95FWalYZTbZ7bRSoXKQb3NMguLwTRCKCRk2c5CYBQk s8KBAQPJ7QYRLid1NH9BtGjk7nq//GN92cAetYtgPNqFPjtNrBjXZiYQ+pLUECsUrRY2 bHNxDI76KuQ1KGO9zyvN0c3QJ+iVcQtjl7Z44EtoGm57Dy8l7cjVb+id7VJKB9cZ35fn zMY+YEDjewDdMC2+fqu29NX2DQIyjz+e0PpqUZ8fG5QxR5+MEgjLiRBia7LsDPxnna59 mlSQ== ARC-Message-Signature: i=2; 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; bh=747r03h0CE8rjPhe6+5KxHqqGClXovcKL2oFzoZWcR0=; fh=bYNgxUv5aDVv8ODFnU81QVGUrcSfp9UeUM+wu8I0NkA=; b=g+pQd1Uss1F4cQHvL+NG6t1VRgzlQ1yKEaNmOUSS2f1jFA/AqEw/rDFiHfkF6g93/u zu37MFnL5UZQ9qADzcIdLg41/H0l7EotCKrdDZIaNcJ0PAPfWhQ26Ap7k6d+0aPMsO06 JqmrYoTyBHCdwqxiN+o/Jjm36H+0DPDc18mNAs8Ltuot2w1eXJOAsyjjXWgQwtCRXOIk J38WDoZcroFXMNekmyf3JNdmS6YsLrNzBGS5ZRTqdWfkXX3pE8crd8+GyyBMKZkuoqZR 94psqCTICqAq7G+9NbjLi0kW0vXu0yUDpCFhKj4W1CfgHJJ9mf7KfOeMhdqeY5DjiVDZ 2MnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-85604-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85604-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o38-20020a635d66000000b005e49d9ecdcasi141860pgm.741.2024.02.28.11.34.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:34:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85604-ouuuleilei=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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-85604-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85604-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 4E62E28A642 for ; Wed, 28 Feb 2024 19:34:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AFC24161B58; Wed, 28 Feb 2024 19:33:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6ADD774413 for ; Wed, 28 Feb 2024 19:33:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148795; cv=none; b=dlhFaRNUrYcOJ9ImGvP7IYpGgoe8t6DPgm1K6l7p9Jl0iCbEySQmdIFfVNnSABhvKr1hoUB749xhWXMt+TRnPfvQjfyaTd8eWEcrPPnJmEDQpkviVdJvywnRxciTCYUYOm4IQKaYQgwnzmIgcqYMQQ6ZprIo3/RiI1WX/jiRquA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148795; c=relaxed/simple; bh=VlygoFXI9hR5tbz+SuSs/dkPVV9lWxWrx5MkcSEsv/4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TAU12RPaJMwlYG4Xmj6rKVcY2kr3ShgIIHc2TLtNco+MvV0MJtAga5mvzstT7e9Be0th+BwXbDL8rUcnEu6cpXrnhjpEf//pQlxNkbESLDt8hZSspB1qX4a1LvzOt2bamUv8vakx41ReB92i0IpnE5v2AX2jgqo4tIozAHe2qbQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B5EB9DA7; Wed, 28 Feb 2024 11:33:51 -0800 (PST) Received: from pluto.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 21E4A3F73F; Wed, 28 Feb 2024 11:33:11 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, peng.fan@oss.nxp.com, michal.simek@amd.com, quic_sibis@quicinc.com, quic_nkela@quicinc.com, Cristian Marussi Subject: [PATCH 4/4] firmware: arm_scmi: Use dev_err_probe to bail out Date: Wed, 28 Feb 2024 19:32:38 +0000 Message-ID: <20240228193238.2102157-5-cristian.marussi@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240228193238.2102157-1-cristian.marussi@arm.com> References: <20240228193238.2102157-1-cristian.marussi@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792172463324272075 X-GMAIL-MSGID: 1792172463324272075 Use dev_err_probe on the failure path of SCMI core probing. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/driver.c | 34 +++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index a3182199f123..7329f3a1c1de 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -2522,6 +2522,10 @@ scmi_txrx_setup(struct scmi_info *info, struct device_node *of_node, ret = 0; } + if (ret) + dev_err(info->dev, + "failed to setup channel for protocol:0x%X\n", prot_id); + return ret; } @@ -2791,6 +2795,7 @@ static int scmi_debugfs_raw_mode_setup(struct scmi_info *info) static int scmi_probe(struct platform_device *pdev) { int ret; + char *err_str = "probe failure\n"; struct scmi_handle *handle; const struct scmi_desc *desc; struct scmi_info *info; @@ -2841,27 +2846,37 @@ static int scmi_probe(struct platform_device *pdev) if (desc->ops->link_supplier) { ret = desc->ops->link_supplier(dev); - if (ret) + if (ret) { + err_str = "transport not ready\n"; goto clear_ida; + } } /* Setup all channels described in the DT at first */ ret = scmi_channels_setup(info); - if (ret) + if (ret) { + err_str = "failed to setup channels\n"; goto clear_ida; + } ret = bus_register_notifier(&scmi_bus_type, &info->bus_nb); - if (ret) + if (ret) { + err_str = "failed to register bus notifier\n"; goto clear_txrx_setup; + } ret = blocking_notifier_chain_register(&scmi_requested_devices_nh, &info->dev_req_nb); - if (ret) + if (ret) { + err_str = "failed to register device notifier\n"; goto clear_bus_notifier; + } ret = scmi_xfer_info_init(info); - if (ret) + if (ret) { + err_str = "failed to init xfers pool\n"; goto clear_dev_req_notifier; + } if (scmi_top_dentry) { info->dbg = scmi_debugfs_common_setup(info); @@ -2898,9 +2913,11 @@ static int scmi_probe(struct platform_device *pdev) */ ret = scmi_protocol_acquire(handle, SCMI_PROTOCOL_BASE); if (ret) { - dev_err(dev, "unable to communicate with SCMI\n"); - if (coex) + err_str = "unable to communicate with SCMI\n"; + if (coex) { + dev_err(dev, err_str); return 0; + } goto notification_exit; } @@ -2954,7 +2971,8 @@ static int scmi_probe(struct platform_device *pdev) scmi_cleanup_txrx_channels(info); clear_ida: ida_free(&scmi_id, info->id); - return ret; + + return dev_err_probe(dev, ret, err_str); } static void scmi_remove(struct platform_device *pdev)