Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9747EC61DA4 for ; Mon, 13 Mar 2023 10:59:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229835AbjCMK67 (ORCPT ); Mon, 13 Mar 2023 06:58:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbjCMK6t (ORCPT ); Mon, 13 Mar 2023 06:58:49 -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 E65BA252AF 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 Xmyg2900401Vtj801mygze; 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-00C3Hz-Ew; Mon, 13 Mar 2023 11:58:39 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1pbft1-008cWa-RO; 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 0/6] spi: struct spi_device constification Date: Mon, 13 Mar 2023 11:58:32 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, After noticing new cases of casting away constness, I went over all spi_get_*() functions and their callers, and made the following changes: 1. Make all pointer parameters const where possible, 2. Remove unneeded casts, some not even related to constness. Patches 1-5 do not have any dependencies. Patch 6 depends on patch 5 (and current spi/for-next). Thanks for your comments! Geert Uytterhoeven (6): mfd: rsmu_spi: Remove unneeded casts of void * spi: fsl-dspi: Remove unneeded cast to same type spi: Constify spi_get_ctldata()'s spi parameter spi: Constify spi_get_drvdata()'s spi parameter spi: Constify spi parameters of chip select APIs spi: sh-msiof: Remove casts to drop constness drivers/mfd/rsmu_spi.c | 4 ++-- drivers/spi/spi-fsl-dspi.c | 2 +- drivers/spi/spi-sh-msiof.c | 4 ++-- include/linux/spi/spi.h | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) -- 2.34.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds