From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F8C4C25B6B for ; Wed, 25 Oct 2023 09:52:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343637AbjJYJwh (ORCPT ); Wed, 25 Oct 2023 05:52:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343610AbjJYJwe (ORCPT ); Wed, 25 Oct 2023 05:52:34 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C466DDE for ; Wed, 25 Oct 2023 02:52:30 -0700 (PDT) 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 1C3432F4; Wed, 25 Oct 2023 02:53:11 -0700 (PDT) Received: from bogus (unknown [10.57.93.106]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 55DE63F738; Wed, 25 Oct 2023 02:52:27 -0700 (PDT) Date: Wed, 25 Oct 2023 10:50:53 +0100 From: Sudeep Holla To: Jens Wiklander Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Coboy Chen , Lorenzo Pieralisi Subject: Re: [PATCH 1/4] firmware: arm_ffa: Allow FF-A initialisation even when notification fails Message-ID: <20231025095053.i7bpswi6x6ckqdnr@bogus> References: <20231024-ffa-notification-fixes-v1-0-d552c0ec260d@arm.com> <20231024-ffa-notification-fixes-v1-1-d552c0ec260d@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 25, 2023 at 09:10:11AM +0200, Jens Wiklander wrote: > On Tue, Oct 24, 2023 at 12:56 PM Sudeep Holla wrote: > > > > FF-A notifications are optional feature in the specification. Currently > > we allow to continue if the firmware reports no support for the > > notifications. However, we fail to continue and complete the FF-A > > driver initialisation if the notification setup fails for any reason. > > > > Let us allow the FF-A driver to complete the initialisation even if the > > notification fails to setup. We will just flag the error and continue > > to provide other features in the driver. > > > > Signed-off-by: Sudeep Holla > > --- > > drivers/firmware/arm_ffa/driver.c | 21 +++++++++------------ > > 1 file changed, 9 insertions(+), 12 deletions(-) > > > > diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c > > index 07b72c679247..b4ba52d674e5 100644 > > --- a/drivers/firmware/arm_ffa/driver.c > > +++ b/drivers/firmware/arm_ffa/driver.c [..] > > @@ -1426,10 +1426,11 @@ static int ffa_notifications_setup(void) > > ret = ffa_sched_recv_cb_update(drv_info->vm_id, ffa_self_notif_handle, > > drv_info, true); > > if (!ret) > > - return ret; > > + return; > > cleanup: > > + pr_info("Notification setup failed %d, not enabled\n", ret); > > ffa_notifications_cleanup(); > > - return ret; > > + return; > > This return is redundant. > Thanks, will fix it. -- Regards, Sudeep