Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp748355lqs; Fri, 14 Jun 2024 04:51:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAkE4Vw37qGN9HOEq2LSsOBI/TvygEmoX0BLp9sYYpj0JCRHVXPwvQp4zHMhlaVY5TVVE+6P6Tu1dg84G96VB22bjbgqZlhYm/LVGfhQ== X-Google-Smtp-Source: AGHT+IFFRCx42JOh1HfMe1UDHuO7yjq4yCQAUlO9kgjBEaUIOniHTgZFZzQcEQt1v1AeZe2AyNZK X-Received: by 2002:a05:6358:9889:b0:19f:431b:9203 with SMTP id e5c5f4694b2df-19fa9dece1cmr296849055d.4.1718365897366; Fri, 14 Jun 2024 04:51:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718365897; cv=pass; d=google.com; s=arc-20160816; b=WMN85jFtB0P/Tt55DRuIPbDaRgEVLLBMU6vs7pkgHLZbpWIb+164Sm0Wxj5+bSMRJb 9nT3rc1I+OzifHRAn6VWfvyVhTGZLd1NKFTXPKmfODW1QoTmLeLWAJyFOFmI9+0xTeP0 Esnthlkz2JC+c5HOBYvhx/Q9ALYsv9KJo7zidou+TYKJ3STR6w9kJA7mlvF4E6pjlzvU IqebPagoxgJQBdL/38oChNWPasggGQMcJP4rNPUumAnC8pJjmbyIrQucAQCAEen/qIWA 3JhZaFae1wZWl92iSCdflD2AdGY/aD/XVTmL3DqN5lz3B+gFO7/wDrT5yu7cKgBvrbMD D76g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=DMXr4IBj4BPkkNnA/ZtQPdtOikhhO84fIhpTn9lH/5M=; fh=sEB+mmaZ4gybA2g9Adtg38+axixxLxV2pQLAefc8q0Y=; b=K3Bg9a4oBSi0/kM6uu9CmxQtMrUPyDJw42228ZGk8G5bzgXmTKbBxfam/xfatmq9Fg 3DYlT+mFDs34zIq1/wwvCD/+RaXdaPiJAz6E0xFlXTRm96kAdz4HnRaYYgVWXv71ZpZ/ z87kcwxjSi9QaC0wy/5PkGfte/wWbl/QNObw32nWix2eZV4DatAoDrrDs3wRyOowEWrd K0Q/0ZCCHMAkOWc5l48dXNEqbpjBTcaYsrOsYl22RoKrCAXkB+wyVCpjnIDETRz9CDiX dLR1eSlL8SOAU9ljCNjH+0YPUqfFV8+zeIasBHzDWp8mxlXqvdejTDF9UX6cclRXje16 wemg==; 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-214828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214828-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fede81ea60si3266304a12.241.2024.06.14.04.51.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 04:51:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::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-214828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214828-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A3D9FB24F9C for ; Fri, 14 Jun 2024 11:20:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18D4C1953BB; Fri, 14 Jun 2024 11:19:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4530413B2AD; Fri, 14 Jun 2024 11:19:55 +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=1718363997; cv=none; b=hW0WhBqsu7CfXb6LeeAYLhWVq3YONQEUWEd6wYvlAVV1o+b7d5NpfEY4BZO1/2QmoHF12T6UAIu0KDknq16W6SZbjsmi+irGyzo1KXug+GoipEqRYhue0XiZRiyfSkG4ip+jqYRYDmUCfmKCy9G7dcvJBnFX3OqjZAyBKu1D3g0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718363997; c=relaxed/simple; bh=cFyihkIH027mZr4iPADM0XrNS9KyPSmcplzZr3uL4kM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S7Lq6BZgFGAIAdnDrQWt1QM4BZBhHtPQqDn5VATChQz6lzEgBc8g371Hge47p6jMiXt2lghF0AtMzk8ZFGnZ0Jg6ki/3wiCLSWwX91EDt1SWikUjl0OTpLHGcULNAbHrMEYNg8SzwALOtTvSAPXplb2WlQqGwvBbT/TpJpdCF2w= 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 2FC3DFEC; Fri, 14 Jun 2024 04:20:19 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 68D153F5A1; Fri, 14 Jun 2024 04:19:53 -0700 (PDT) Date: Fri, 14 Jun 2024 12:19:51 +0100 From: Sudeep Holla To: Cristian Marussi Cc: "Peng Fan (OSS)" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [PATCH v2 2/2] firmware: arm_scmi: mailbox: support P2A channel completion Message-ID: References: <20240510-scmi-notify-v2-0-e994cf14ef86@nxp.com> <20240510-scmi-notify-v2-2-e994cf14ef86@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jun 14, 2024 at 11:31:43AM +0100, Cristian Marussi wrote: > On Fri, Jun 14, 2024 at 10:19:42AM +0100, Sudeep Holla wrote: > > > > diff --git i/drivers/firmware/arm_scmi/mailbox.c w/drivers/firmware/arm_scmi/mailbox.c > > index adb69a6a0223..3bb3fba8f478 100644 > > --- i/drivers/firmware/arm_scmi/mailbox.c > > +++ w/drivers/firmware/arm_scmi/mailbox.c > > @@ -326,30 +326,25 @@ static void mailbox_fetch_notification(struct scmi_chan_info *cinfo, > > static void mailbox_clear_channel(struct scmi_chan_info *cinfo) > > { > > struct scmi_mailbox *smbox = cinfo->transport_info; > > - struct device *cdev = cinfo->dev; > > - struct mbox_chan *intr; > > + struct mbox_chan *intr_chan = NULL; > > int ret; > > > > shmem_clear_channel(smbox->shmem); > > > > - if (!shmem_channel_intr_enabled(smbox->shmem)) > > - return; > > - > > if (smbox->chan_platform_receiver) > > - intr = smbox->chan_platform_receiver; > > + intr_chan = smbox->chan_platform_receiver; > > else if (smbox->chan) > > - intr = smbox->chan; > > - else { > > - dev_err(cdev, "Channel INTR wrongly set?\n"); > > + intr_chan = smbox->chan; > > + > > + if (!(intr_chan && shmem_channel_intr_enabled(smbox->shmem))) > > return; > > - } > > Fine with dropping the dev_err() but is not this cumulative negated-if a > bit cryptic...also you can bail out early straight away as before when > platform has not required any P2A completion irq...I mean something like > Agreed, updated now. -- Regards, Sudeep