Message ID | 809c82d54b85dd87ef7ee69fc93016085be85cec.1667555967.git.geert+renesas@glider.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp302904wru; Fri, 4 Nov 2022 03:20:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Auyz+Ot3Bp76rtBN7I8i/S7hJ+iUpc7SfCSJxKJHfRAU2rNj3d1HnvQVUAWvJsVS0InyH X-Received: by 2002:a17:906:9bd5:b0:7ad:939d:79a9 with SMTP id de21-20020a1709069bd500b007ad939d79a9mr32994060ejc.479.1667557251188; Fri, 04 Nov 2022 03:20:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667557251; cv=none; d=google.com; s=arc-20160816; b=DTJoyg7MEaGv6z+VlCgeAekaIrEBhSF/MN0fJkO7xSeUhCaCFCbYgk/8totAz2to4G CjiwMt9NPIn0ewkN8SoN/TgVDia7dVE16X75J9AsxXytBx6UChnlsOR/qjLRg4zpslEm eE1cbN1eCYRB2EdfINfYu06rXJJZi9ZbUI5POO52oeVKRX4+k8pM6WqFMjQ9C9+XseRS zX8c+tIhQQ00k6z1TBJZYGH9mSuH/iL/UFPL2DJ42e2vDJybdW23UZBhFOTI/9Sa4ouh bWYdWxbW79kEW/p0mHRdUX5wxWl0xkQ3h3zuauDTLOXl7pT/IT68a4KrgqQ7wO9du12K 9qhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=KtwKebpUg57NygEJHrAEC/VlK0xaxJYHER1VQ3a6hlg=; b=nh6kBCDiH7sToupEEuUf9u7x004sIJUgpClWGVBLS4BDWfEKUPRRSRYtTiZP67Frbh KqQlkf5yxHtXFwL8VoVXWmNZ0lOpcW7nhQ2tb6dv7CKuBDHB+SgprPw2Q+/5o8QKxX5b k336SdEjfcQ22BetIxY5xZXX3VGsuKuQsiBQDJ8EzBbZiJ02ZHoCVyuK53M6Tmwt+cn0 AzWQDli4bTIESQS30iVmMWNAjvPl+fYpTbYBj7SSr+SSGUF88pm3VRXaOWEWqgzQdjmW sGl2GgHGTgCyyh8+RMSAH85+t64Npk3IayASNaoBH4ar5fYb0MvxPQqJ3qDZDDt0JoQO zFGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq8-20020a1709073f0800b0078def5c29e3si5823190ejc.596.2022.11.04.03.20.27; Fri, 04 Nov 2022 03:20:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231390AbiKDKEC (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 06:04:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbiKDKD7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 06:03:59 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A5B1FFF for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 03:03:57 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed10:c5ee:bf27:9df:5172]) by laurent.telenet-ops.be with bizsmtp id gA3t2800G2kjr6L01A3t1H; Fri, 04 Nov 2022 11:03:54 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from <geert@linux-m68k.org>) id 1oqtYG-002m7b-Cx; Fri, 04 Nov 2022 11:03:52 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from <geert@linux-m68k.org>) id 1oqtVy-00HVU8-Vt; Fri, 04 Nov 2022 11:01:31 +0100 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Mark Brown <broonie@kernel.org>, Yang Yingliang <yangyingliang@huawei.com> Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH] spi: Merge spi_controller.{slave,target}_abort() Date: Fri, 4 Nov 2022 11:01:27 +0100 Message-Id: <809c82d54b85dd87ef7ee69fc93016085be85cec.1667555967.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748560512624763510?= X-GMAIL-MSGID: =?utf-8?q?1748560512624763510?= |
Series |
spi: Merge spi_controller.{slave,target}_abort()
|
|
Commit Message
Geert Uytterhoeven
Nov. 4, 2022, 10:01 a.m. UTC
Mixing SPI slave/target handlers and SPI slave/target controllers using
legacy and modern naming does not work well: there are now two different
callbacks for aborting a slave/target operation, of which only one is
populated, while spi_{slave,target}_abort() check and use only one,
which may be the unpopulated one.
Fix this by merging the slave/target abort callbacks into a single
callback using a union, like is already done for the slave/target flags.
Fixes: b8d3b056a78dcc94 ("spi: introduce new helpers with using modern naming")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
include/linux/spi/spi.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Comments
On Fri, 4 Nov 2022 11:01:27 +0100, Geert Uytterhoeven wrote: > Mixing SPI slave/target handlers and SPI slave/target controllers using > legacy and modern naming does not work well: there are now two different > callbacks for aborting a slave/target operation, of which only one is > populated, while spi_{slave,target}_abort() check and use only one, > which may be the unpopulated one. > > Fix this by merging the slave/target abort callbacks into a single > callback using a union, like is already done for the slave/target flags. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: Merge spi_controller.{slave,target}_abort() commit: 6c6871cdaef96361f6b79a3e45d451a6475df4d6 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 27680bf02c6a221c..78c35ac1ef2f2b7e 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -655,8 +655,10 @@ struct spi_controller { struct spi_message *message); int (*unprepare_message)(struct spi_controller *ctlr, struct spi_message *message); - int (*slave_abort)(struct spi_controller *ctlr); - int (*target_abort)(struct spi_controller *ctlr); + union { + int (*slave_abort)(struct spi_controller *ctlr); + int (*target_abort)(struct spi_controller *ctlr); + }; /* * These hooks are for drivers that use a generic implementation