Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp526050rwl; Fri, 4 Nov 2022 03:22:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6zTI6HGi9I9TjHWXOuzIW3s+s98Qk3uIZAizLgvhj0HRQ2jBc0EH9vmhTqRPbR3zHiu4b7 X-Received: by 2002:a17:907:2cf1:b0:7ad:f558:e148 with SMTP id hz17-20020a1709072cf100b007adf558e148mr17396118ejc.274.1667557332730; Fri, 04 Nov 2022 03:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667557332; cv=none; d=google.com; s=arc-20160816; b=jMttrllaTjJPexXssQ2Km12Nhq7cuvEnZfxHVeheQrbSJhrfz5AcY51EMEuY6gikkY ooeXcK7oCusE541rqzXtayZy4/fp38fD18dIhGvRNs/OKY62opMpg5P4+y9bvilRwAyM d6QX1fIUu75VdDNAKnL4AXZlWOf/FxSZfWzaZU/gyltw+Z0+daweF/XF/ObJwxJQGQ5h Nop7gCsJibbaLCl/POmyXmqdeDBXS9lhltjHvoQcydLzGhHRtxt6GJfKjGnoljEMqtRU FD/w28pXVOf4PCq4oej7XB76Fpzw95KG9o/y5HOkfb2+TbEfO1tsWaSYGEhiKy9M9Wnw YOLg== 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 Return-Path: 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.21.46; Fri, 04 Nov 2022 03:22:12 -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 + 97 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 ); 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 ; 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 ) 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 ) id 1oqtVy-00HVU8-Vt; Fri, 04 Nov 2022 11:01:31 +0100 From: Geert Uytterhoeven To: Mark Brown , Yang Yingliang Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Compile-tested only. --- include/linux/spi/spi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.25.1