Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4046370rdg; Wed, 18 Oct 2023 13:18:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHhGZ+njR7laNQ6IxAdG4BCC7P/qXD39mA5ecBOyHHzxrrXvBqhyImFfA2AZ0bXkVvrder X-Received: by 2002:a05:6a20:9191:b0:13d:d5bd:7593 with SMTP id v17-20020a056a20919100b0013dd5bd7593mr258407pzd.12.1697660323762; Wed, 18 Oct 2023 13:18:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697660323; cv=pass; d=google.com; s=arc-20160816; b=US4wLzWE2DdSkuzQW3SWh68r2uiABNrEiWwU4V3lEGON3z1IbHPRDwZKUUUALay7fD W0SCNuutPwf+RZwWax7nPnTVBSJ4gSNpIAhVL0zQG6RHwigIhmjD9CoX3leaKGYk9HNV JbhQZeOiO/VG2QREfQ0VjmlggyKeSJoXjY0SlMfew6V2LpAH+I2CyGAuN6vrkYmgskEU ZNB4SdngKU1fFZPfxNOnKnY7UJ/mJianKx/77RmohSwSE7KSWhxExEK+teAXO/JIVABp mDJYl0w5w/MJl067X+oGWEpMAEMzujDvjl6iTuPG9a3JnYIb8KXxtkCwac8sb/km8c24 dfbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eZ2Jl+fl9VN73p3RJsWj1LAmmN8loqE4eoH0waDHuA0=; fh=UkkYiFVskgIV9NpngF9lYFAfxU7P3n7EShmTqbZI5dk=; b=A7anB3oPVTO+xB96OamLW7qiynA7rj0LZ0rbOSaFyM0mAxIPzN7IN5GgLOt+OEYMzX Fywb89q9CvQwNSAvQUnPOeooiAk0fkNliCFqASz61BFsvJjl4lTzkrMr9NBeaaKul813 PBxA/oQHO+7J0s1DY/hApzf/KaJr/eYt6ZOaYOKgHaGgTjoYhkayn/FFyG1ODsJw4t8y OaevLw434R601C+BztQza8SwB61pfDwd29xbpUsiyIOwuhLTMLv7hkZhqQFD4YDiSuin Yn4mpqbYlnA4MRAskbGiYx+8exPEET2HrhzQx7TBYI2OQtaUHobSYo/626mcoXlxc+nQ TA1Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=R0A7BkDE; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id ls13-20020a17090b350d00b002764fc15dd3si621079pjb.37.2023.10.18.13.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 13:18:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=R0A7BkDE; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5E7DF813E69A; Wed, 18 Oct 2023 13:18:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbjJRUSb (ORCPT + 99 others); Wed, 18 Oct 2023 16:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjJRUSa (ORCPT ); Wed, 18 Oct 2023 16:18:30 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2042.outbound.protection.outlook.com [40.107.22.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31D5F112 for ; Wed, 18 Oct 2023 13:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PYg9zLgiUdRdP9MvzJOLGrKq8YilQCDgJVYW5vwBWWojLufAbJFKRJZEbdwtAqtluOnCscYS7sePBMwWUc23U6FRrVLQzJdirQSu/umksw520/0ZHbcRhIdEdTbyMSvlQn3Wz4lO/Xp6g2v/oYpbhp9nZ7IBAhsDyYz1afo7BCvebu687i44cnjyIJF2abcnT8Lw36j/WIMhyq3klUx4mmIppZRmM7mId7LGQYg3oZNfZ1TvGgt2tWrKjm5QKKUSqktUex+YckqEc1/jlltYzZ692TLC62lStW7xZ6RCwp6XL2f/mwmJS7GDvSq2wLq2eF7Fc3rcV4NGEuXp1DNHqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eZ2Jl+fl9VN73p3RJsWj1LAmmN8loqE4eoH0waDHuA0=; b=UF5ehK26Qz0/Jsnzfszu95ifPg2wINfoFDgZpvXVf0F6JbVK+mzrcY3z0EaBihsdAUFgztlivr2t9ZHhUUHS5IQfEGNWPASDxfNcQ3zliqBOZHjttzACQcdkS6YTLaFHhRk8/tYmyEaa2kUhcfq3Gn83I4H/5yJLcgeSrIoe/xk7xWM8jovgbXbs1h4RBpFiYA/KeWNQYmdQNqyNpY+3axfdIREytyGnH66IQD3aiH54qHcMvxWyTLB57IoUklyXwhwF6yaQXbL+8LFPiqvpX8ixrg+Uz0p8ycaVbtn1gkihSKMwIrMZZKW6TWgisU0fTzY+K06W73RvL7dRxLiEGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eZ2Jl+fl9VN73p3RJsWj1LAmmN8loqE4eoH0waDHuA0=; b=R0A7BkDEG101vX/KLtoxKkr11PAMEPC2GI4QdAV2JGi+kX5vEh1wsgE3eYI16EjdD/d9hxfOa9yb9rPUeOA7zGlwnAIeXSCDpgKPfCr6rps9MbssifV6G5yorydrfZ0pN7I/0NzW8yQc8rXy6/54fo/xl+KPCVyw3r9ywPTU5xk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AM0PR04MB6978.eurprd04.prod.outlook.com (2603:10a6:208:17d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.23; Wed, 18 Oct 2023 20:18:25 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2%4]) with mapi id 15.20.6907.022; Wed, 18 Oct 2023 20:18:25 +0000 Date: Wed, 18 Oct 2023 16:18:18 -0400 From: Frank Li To: Jarkko Nikula Cc: alexandre.belloni@bootlin.com, miquel.raynal@bootlin.com, conor.culhane@silvaco.com, joe@perches.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: Re: [PATCH 4/5] i3c: master: svc return actual transfer data len Message-ID: References: <20231016154632.2851957-1-Frank.Li@nxp.com> <20231016154632.2851957-5-Frank.Li@nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SJ0PR03CA0010.namprd03.prod.outlook.com (2603:10b6:a03:33a::15) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AM0PR04MB6978:EE_ X-MS-Office365-Filtering-Correlation-Id: bd7eac22-d6ee-4ea1-f428-08dbd0176232 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U8Vp9apbNPiNLbgWVTnk5HmQJFcvF4AQtNWPWG6hvURgRQ50ue1bKD3TxKUTcuX6lETjd4xgtNKEQugYF3fouwlEB8ScMDrgSWWgerIU2ESqz3JT7smM49rFCKFXF0MKxXDKO9h38yhS2d54xHXlzqfsiL1z9gPqo4gMcEOdPiZBy6dtz726KzA0vDeJbJASKlRA92V91WfJiGoMe39sqShWvunPZsEAHwNFrcC4k9lUuvXxsPu8Nq0XR4YNM/IT2Inqtghu6Hy+xVPvLA1gYm4amP4rVMis1YrT1AQe/urb5XsRs4OhxbInYDxsNbEuvCR+N88HDr+ffe0IYWnPWj7SRba2ic+Q0O4LyGJ0cvjQMg4uMMbVqac7JKera96LBKoGS4OQCvPHVmMs7IF5PwN/d2b+y8GhIme/czkJohNNWCcVNPF9sF8wPvLvz9jsbem8m9QI7vg3N0hlCgn7qLH4UkMgT/bHVV4atObPxi2mRy5mHfC0xf7WoqDJKIPuuneGjNjSM2e5GuczP7enf0JAW3QL77qsaM0/qdJBcVAzgDQ8bomBj55u81MJgTyQGSGVidSnziaRywmREbklOeOh1XrXpQt+3TigKuT5apPvYoyeoepcgSL+2KI/amDw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(346002)(376002)(39860400002)(366004)(136003)(396003)(230922051799003)(186009)(451199024)(64100799003)(1800799009)(38350700005)(33716001)(52116002)(2906002)(86362001)(8676002)(8936002)(5660300002)(53546011)(38100700002)(26005)(4326008)(6512007)(316002)(6916009)(6506007)(478600001)(6486002)(9686003)(6666004)(66556008)(66946007)(41300700001)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?bGNdrQpt3OwTvKwLLTTmIPo4K5zV7wRNQ3Fu7XCPip7C8OwIk4x1xD6KQlFp?= =?us-ascii?Q?j40zmvfSQ/sYMM1WGTLbq9cskw5k8Cs2/6Tv+UXXQ0aRgIDqnyMnbQFMk62i?= =?us-ascii?Q?XH2+gcqrY7HF36ZqhKbhzUdG8MB3vJFvOmlVcbwqkHjttifXRsUAt2/intc1?= =?us-ascii?Q?gtzYATofWwTPZtcflIYE2N7PcsHqjQd5Ps2gmYftoKW0KuTG61/QncMyrNKx?= =?us-ascii?Q?FLcgr55WiWmvNJCuVXqYqkPPT5/8TccNHHI/QgIawIijqaTkg7X8uaHyrVe6?= =?us-ascii?Q?NvkMBDDWEAJZpdEMd3zglxdwArdE/kzFnlRepBvURM8dIHZ9Z13A+PcL8zWa?= =?us-ascii?Q?b1dnrkwbq7ihfRKZfsOHnMF+/CcY1scVEsZAH9NILMfZT0L262cWlX/T1PWh?= =?us-ascii?Q?174OmCXjb3FxuqfuAhcoRmos6ym+Zd72nFH0St35AnoB/D/4dmUsaooGbP5X?= =?us-ascii?Q?Oajx7u+X2siMM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ZrTOtXD?= =?us-ascii?Q?Kqo77SvUwpENTYsBghfFPiw6u0/ezJMpErvqikBwHdMLeHyYjwr8WpuY0GcJ?= =?us-ascii?Q?EJEG9RM7ZAwrKEhuea1qnhEA8j+D0qpUJx3uzjpYLM7hrK7VE+m0fEHs9k5g?= =?us-ascii?Q?LQ3SSkTW1XLnHP/4UJl2cT/lewmZA2c0nbbL25cRgohoEB4GCHBV3u+Mm7NO?= =?us-ascii?Q?c+Fj7jSJEn/euozFtkA=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd7eac22-d6ee-4ea1-f428-08dbd0176232 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 20:18:25.4707 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: e+QK0DYw1F8N7p9zEQU0+7sCCkqZNnb4hi3uav4Iw+9oH1vz5LJ5zimARmyh1QLi3VquEmn8lLE8RXC6PELsBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6978 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Wed, 18 Oct 2023 13:18:39 -0700 (PDT) On Tue, Oct 17, 2023 at 11:33:34AM +0300, Jarkko Nikula wrote: > Hi > > On 10/16/23 18:46, Frank Li wrote: > > I3C allow devices early terminate data transfer. So set "actual" to > > indicate how much data get by i3c_priv_xfer. > > > > Signed-off-by: Frank Li > > --- > > drivers/i3c/master/svc-i3c-master.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c > > index 3570b709cf60..444825aafa6f 100644 > > --- a/drivers/i3c/master/svc-i3c-master.c > > +++ b/drivers/i3c/master/svc-i3c-master.c > > @@ -138,6 +138,7 @@ struct svc_i3c_cmd { > > const void *out; > > unsigned int len; > > unsigned int actual_len; > > + struct i3c_priv_xfer *xfer; > > bool continued; > > }; > I'm thinking would it make sense to combine this and previous patch by > removing the read_len/actual_len variable from this structure and use the > added one (by the patch 2/5) from "struct i3c_priv_xfer" directly? Some I2C transfer and CCC use svc_i3c_cmd, in such case xfer is NULL. Keep len/actual_len is more simple. Frank