Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4591304rdh; Wed, 29 Nov 2023 05:55:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7Z556n3Ste7HZamiwsnfz7GjWQO+oe28gfBfhlXEiG7Q5qMDK4A7+3K2s5N7UtgLkVU1G X-Received: by 2002:a17:90a:1a5d:b0:285:6412:ffe7 with SMTP id 29-20020a17090a1a5d00b002856412ffe7mr17984507pjl.27.1701266152023; Wed, 29 Nov 2023 05:55:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701266152; cv=none; d=google.com; s=arc-20160816; b=dPuz5kkah4dmGGB3Gg5UjdG92oElS/Gqi0r5WJD32rDrY0i1PBV7WZpsyp2dCI7hBf Wl/T+YvIedT66bK//j5IbQ8imQCbku+G+YJNwS5oAvjko9SNv12vmrBu3/rCWX1zsRGt BUK7Hcl2xlSNUgUoyPpgtCNqPB9e3cRq3FZoJqpOwuGTCQ2ssm/vmL+7gKtcxHuWZX6x eAEEqTJx1XFV7okwvMMo+cewrvlFFWawJOSdmBPN9V8ouvenrNM8tFJxtH85SPnH1Bmp PTRFKGEZ8HslN3Q4BJwq8VQYhxXvAq73QgutCXxK3sr90FfvO2DzEbI+p/LPsoQ/D4to oxXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xpuvInZNM8fsmU2z2sR/CbG3xzQL+n8KAjtla2xbn9g=; fh=+NDfU1qjud6rX9mya66FwLR1tHCiFHUB61r4SBMJh5w=; b=x+0/Qxbr7SAqldmtwQl2zIDZq7WxEiE3RJLxe8gTPrxknXcRgmyL0jVJZsG/ndUjod 7MC6PfIS85wmX5iattg9BVP33DJIOPWyC4IBiW3XHDYMsVVFvk3pNmxpFUrwqIJvblmW fRALaGa40Xi1zCp8RJUZ2u/8IbhYX4Z9DDAnzSwhd+UCY7QBRmj8zDUkJyyHuejv22i4 71+MM/abJHfVm2GxvV7CnXtTEblb7ye4kOdEQjljMSVTpQaVbRq1lvYc4CcxKw61cEnE 2Ec/XwzVJLlnDI0rlOMGuk2RCmeQMdiksnN5d2mDrIXJX+ZDNw2RCGVBdU1X2LFkpPot X7iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n9pmanAn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b10-20020a17090aa58a00b0028025d519cfsi1341368pjq.177.2023.11.29.05.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 05:55:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n9pmanAn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 003DE80756EC; Wed, 29 Nov 2023 05:55:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234435AbjK2Nz0 (ORCPT + 99 others); Wed, 29 Nov 2023 08:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234105AbjK2NzZ (ORCPT ); Wed, 29 Nov 2023 08:55:25 -0500 Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1903E8F for ; Wed, 29 Nov 2023 05:55:31 -0800 (PST) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-5cc55b82ee5so64414167b3.2 for ; Wed, 29 Nov 2023 05:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701266130; x=1701870930; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xpuvInZNM8fsmU2z2sR/CbG3xzQL+n8KAjtla2xbn9g=; b=n9pmanAn3VcMVLpHtiz8w2WEwoGauHHU6YYMpiv+myIEONBQiYaZVIuQQkZtGMUpch 6qPv32PnfNsYFEUOi1rg2L89Y7WvP+erDqFAmI+xV/kpaMAMVtslNHhHpTOU40unYScB bt/gWxK9c+GQHkpGRfjoLLpQHcXp5aFdQtDMQ81TPq4JzklpoYv6QQFh8LVwwBg9qerM LmSmbCCP13fjgK6B9VU9WG7P8me/qvrTNw5Zjcsx5131bB49T+P2Q3+ZJ3EPmeiyQ5zx 6Q78sV4wfSrh6FwgJ35CYZKGFGy8Ydm3n7xTU/8mTxzVHAKSVZkCYJvzzapNfgdEeEpK Y5Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701266130; x=1701870930; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xpuvInZNM8fsmU2z2sR/CbG3xzQL+n8KAjtla2xbn9g=; b=LuQ9b8vqOHomffuZtq33J5+HTeeqZAjFBuNo06c3l2cxba9UL1Q15kxPFDpINUxpGU tdrAhtiIae0e3fOMLGWprtXkWHyRbUJn962UFJGkTr952LoapM78uOVFL0v8V/pB6Qdy rbPFR25OxjWaw5udFRw+1Hc55KvzK2wiP79tVq2sMnfRv6yjdKq/ULTp+6VHB2AlYXLR ZqKmi1b5ddFYkdgQBSjo7vpnZtsItKJ0T4ub6aV+PYC96ZEHVqDLDpr5Go0LmhonEWEY M/2gg7NlZnSDXYMp/X+zRzyv8sIjstuiOIxfP9gRezJkRirqKE4Vk53Ou916pWBRGlOP 5pSQ== X-Gm-Message-State: AOJu0YyO0E3XpwyPcmq/EUx4nzcYIBmG/KFeDVDJTivcJccWIKroXIkL P0E+kzRCv9UipGCliqsCGJyzUHuQjpmCNhiU2yB9uA== X-Received: by 2002:a81:ac5b:0:b0:5d0:b0e7:929e with SMTP id z27-20020a81ac5b000000b005d0b0e7929emr8950952ywj.42.1701266130305; Wed, 29 Nov 2023 05:55:30 -0800 (PST) MIME-Version: 1.0 References: <361901574eec1271c0969edba6492d3f2132fade.1701264413.git.namcao@linutronix.de> In-Reply-To: <361901574eec1271c0969edba6492d3f2132fade.1701264413.git.namcao@linutronix.de> From: Linus Walleij Date: Wed, 29 Nov 2023 14:55:18 +0100 Message-ID: Subject: Re: [PATCH 1/2] spi: introduce SPI_TRANS_FAIL_IO for error reporting To: Nam Cao Cc: broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 05:55:43 -0800 (PST) On Wed, Nov 29, 2023 at 2:32=E2=80=AFPM Nam Cao wrot= e: > The default message transfer implementation - spi_transfer_one_message - > invokes the specific device driver's transfer_one(), then waits for > completion. However, there is no mechanism for the device driver to > report failure in the middle of the transfer. > > Introduce SPI_TRANS_FAIL_IO for drivers to report transfer failure. > > Signed-off-by: Nam Cao This looks useful to me Acked-by: Linus Walleij > #define SPI_TRANS_FAIL_NO_START BIT(0) > +#define SPI_TRANS_FAIL_IO BIT(1) Is it obvious from context when these flags get set? from transfer_one() and in which flag field? Otherwise maybe we should add a comment. Yours, Linus Walleij