From patchwork Mon Mar 13 10:58:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 68743 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1116208wrd; Mon, 13 Mar 2023 04:06:07 -0700 (PDT) X-Google-Smtp-Source: AK7set8iDxsj4muMdxXmKPp14jQ621J6pWp1MKtjBpy1osuoBNK1gDPnaQkdIgexwZXw2Nc4fqyJ X-Received: by 2002:a17:90b:3ec9:b0:237:ae7c:15b9 with SMTP id rm9-20020a17090b3ec900b00237ae7c15b9mr35228105pjb.36.1678705566813; Mon, 13 Mar 2023 04:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678705566; cv=none; d=google.com; s=arc-20160816; b=t+nv+NG6+N8JQgtnApbEiIIxRTT8SarNM+O3BzYix/Ml9aDKbwG98Gz5y6lO3nygdc NGay4IqvjLH4u/6moBhrCdBMWDC5qzA7R26OLWmhybGqBcTMq7L1NIsfC50rrh/U1F40 o5i69SmE5aj79tBYGMr5Pj8wHUZjXfJQAIM/JWj3WHOYToxPAOZCNzZMO346AyWjJL+2 ccdHiupEKQ2GdO5kRhuc/GEsSMuOGJOEArCel3dg1o7/PzsOHMG7wiS3/uJ5MFt/i6o2 YjpgYjyuWAVI3PawHeHZ/B1Hf+dzLYLs0HXvEoaqNZWZUYCrdgHJkuU6CpDytXaGRq+k z8+g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fJBFzdXwQQUmbZTz2fP3Qy4vbz6fZu3rAW/88G/4VeA=; b=VwVHr74zDiwmx87hkVWNh2cRldLWStBUFUGVLc9jlFnUjKHGOt2EeMdtRkp+ILhppd 0hvj6eHmD5n5vieRX1BiwhBhltYELWCeq7VmnCe7YoeXWi1HCPNgRPPVOIlu8waJVpMJ YiuUvcR7kAKqh+Dy17lwlhMUQr0gmspcgeSVDkew8el9UR5Q2/ZDQ8DaBG5SGSsiFEyO 8ragjKi54sqL5YWopfCaenSUSVnvHkN/3cFf3K3mlUlwXDc0rYii89RieYY4IRxIcl47 ++Z3G23PW9mZUK0ZTiLPfGjjlgIM2nX2jCdI2Q8sPwBMc5JLRywsrJ1evBcG63W75nyy VtUg== 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 e88-20020a17090a6fe100b0022c0d4652e3si6313054pjk.86.2023.03.13.04.05.51; Mon, 13 Mar 2023 04:06:06 -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 S229740AbjCMK6z (ORCPT + 99 others); Mon, 13 Mar 2023 06:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbjCMK6r (ORCPT ); Mon, 13 Mar 2023 06:58:47 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E744625962 for ; Mon, 13 Mar 2023 03:58:42 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed50:7ed1:e2c6:b94:264a]) by baptiste.telenet-ops.be with bizsmtp id Xmyg2900B01Vtj801mygzf; Mon, 13 Mar 2023 11:58:40 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1pbfsQ-00C3II-I2; Mon, 13 Mar 2023 11:58:40 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1pbft1-008cWx-Ve; Mon, 13 Mar 2023 11:58:39 +0100 From: Geert Uytterhoeven To: Mark Brown , Min Li , Lee Jones , Vladimir Oltean , Amit Kumar Mahapatra , Michal Simek Cc: linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 6/6] spi: sh-msiof: Remove casts to drop constness Date: Mon, 13 Mar 2023 11:58:38 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760250368468530534?= X-GMAIL-MSGID: =?utf-8?q?1760250368468530534?= Now the chip select APIs take const pointers, there is no longer a need to cast away constness. Fixes: 9e264f3f85a56cc1 ("spi: Replace all spi->chip_select and spi->cs_gpiod references with function call") Signed-off-by: Geert Uytterhoeven --- drivers/spi/spi-sh-msiof.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 50498c4eb661d09f..55dfe2fd89c8ba4c 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -587,11 +587,11 @@ static int sh_msiof_prepare_message(struct spi_controller *ctlr, u32 ss, cs_high; /* Configure pins before asserting CS */ - if (spi_get_csgpiod((struct spi_device *)spi, 0)) { + if (spi_get_csgpiod(spi, 0)) { ss = ctlr->unused_native_cs; cs_high = p->native_cs_high; } else { - ss = spi_get_chipselect((struct spi_device *)spi, 0); + ss = spi_get_chipselect(spi, 0); cs_high = !!(spi->mode & SPI_CS_HIGH); } sh_msiof_spi_set_pin_regs(p, ss, !!(spi->mode & SPI_CPOL),