Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp482347rdb; Fri, 26 Jan 2024 01:16:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9isYKYil0fVMCNHOIQiw/6dlIC7578jOCg1q58p133qk4Y7vGPGt2qZsbjOStj62UuClf X-Received: by 2002:a05:6214:f61:b0:681:557a:d0b7 with SMTP id iy1-20020a0562140f6100b00681557ad0b7mr1240497qvb.124.1706260577151; Fri, 26 Jan 2024 01:16:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706260577; cv=pass; d=google.com; s=arc-20160816; b=Ypl7/HXzsgifepSGRIcslrX5qxK6KB+NJDn+vUw7Tk4CtOB1vYouIQrAdk48cgZ7iV xCUvefhAsHQ1W1bOycck53ekx/dO0dBcVaGl3j7PVZ7uz4kR+S5Q70uslxaOgpIVjCya Vff4dywCTvRWH6KfvH+AHFIx2KMn/BCutilwmuoCNDu0FPzJ61VaSEp+s+VgY1xvLzYp Z8lSlRS3NL6QNB3kt2FOX3ayvx1JHz3gU7M2J2GCvjaweTA6XDZ934DZTCPdIDi91eEO du6BBax0ukTJl//0R+qmX0JwE2Xb1SrZk7b2sB0FmoixXKdUkpO8qlcqA5J6VvNchZ5A 6vUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=shyCezrNB7XdCB+Nwxl8E09WYma+GSqW2YNffaervI0=; fh=vtZDkA5fMeyCqvqTCvwSwrx5GuW0ZT717AFl2MlaMV8=; b=atDLYHSGhxJmMeSf6V0duAty2tM+pz0kKXAwK3liFbMULp9N/YPXXm5eRwcPWRTRUq 80nXrn0d4uwSpMyiYYb8HOC3d1YeLVm8gjyO1GjzCeos1S/dqxZRifIxQYjH7xrV56Ae Mte0pOnyQRTyrg3LlKoptKZjG9JedGM9qc9coE3KfvZ3Igzc142k72PHgbNEIlYSJo19 YaEeGujrHDk6fKYEBjJ6Y0LWP+g3qcZhwa/9jfjtcvZ+WcFdSjG72woURD7IxJyPRTV3 Fel0EdqdS2VkUr4FNB7saQ7wq0AnodtrtnQl3ASSIf3xkfXU2Igh1ymOsdAdeD4SqmuM FPmw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B873oe1t; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-39759-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39759-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r6-20020a0562140c8600b006800eced41asi860280qvr.614.2024.01.26.01.16.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 01:16:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39759-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B873oe1t; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-39759-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39759-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CB1AA1C2638B for ; Fri, 26 Jan 2024 09:15:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88377D272; Fri, 26 Jan 2024 08:24:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="B873oe1t" Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EAAF849C for ; Fri, 26 Jan 2024 08:24:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706257466; cv=none; b=RkEMYsbKmmVRvtggSpK0257YkjuZs/OvyUVluNJCuugj+D0SglCQ2wSJe/AvQACqt7wKFn5yxpwrEsvsGBkqIDO9Q/cuOIYYvJHlH6MD/MWoPvIQHVg9UXSZR/TZkDaQbJZS2BiF8r8cdNlXb5cFEh0N1wvLsxOhqLsZPlwnJQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706257466; c=relaxed/simple; bh=PRiN7e2outscEnHnnIc+xjLsVlsduMoJoGpra6YYkPw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IwdB11Vk8s3qA4DKgoWInpBi2+qjSdyyNEV/QLYEUfE3wkr7SwEFMilbhOyjF4IYJV4KSRdy44ur0bsh2rjkJRS/fJ2j3i7B2z6ddXoRzm7SmwbO5OeKznvPehPZsBT3yLtQzANyPQh8ISgmWD31wcN3XSsRy1i7Ty3MLXwxBig= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=B873oe1t; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40e8fec0968so1658145e9.1 for ; Fri, 26 Jan 2024 00:24:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706257463; x=1706862263; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=shyCezrNB7XdCB+Nwxl8E09WYma+GSqW2YNffaervI0=; b=B873oe1tzF/5GiyOO0gZ3paixuF7K0XQLCCt+ZasiNLGrsmrXm69tm8cXnds6cus08 rdGu/R95pKsq6z0Jw5bnNL31qkvRLvtOqs3qOUtSecym1Wu2GQufl55U8zD7q8WK2Chh AghhZpL6lAUZvRj1HtN76d5zgZgo/lol8XVXgqAqsSrHb0tocwWti9wxtzQ0Uqh0n/ZJ kjztQl28Ph7/+HCr9lvg+kjofAlwiQj63z/KnXwel+6s3wO5oGbc4PgkNXwpfGTp4kVj 0ZMzK63/5FQORlHGWZFbTGI6FT/WJ3d5clHTgkP3IFm2S3bQzQSz6ixEWhnUF10A3hMN Vgng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706257463; x=1706862263; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=shyCezrNB7XdCB+Nwxl8E09WYma+GSqW2YNffaervI0=; b=F0yenKTgRL/O7MukiG8SYX6QSbrUJZ+FWkDd+fFSCexHikrrzBmHW0gfqqky7KPKsJ zLPZvzWBHaJrPtQXPW4MzguDJazx97aYAxEqPHqkZY7OrJ4OONFMKV3OcDSnunNwKQDI ydHek8fR7VM2xFy1Sannm+wkd6EQh0JL+3f5SSx3HOSAfayVunGCPe78hfWBkSJw52uq 0ki7XZjehIeAAWoWIQSxTF4wi7BsbghqLk6cy1deDz4bl9e4CCXTDsaRSovYA3zxrySD YdjYtmv2oIkv26yCOpBs0nVtUHOEhF5twVy9hsZCVaG9uHfaWG3/g68RLQ9eny2w0Jtp p5mg== X-Gm-Message-State: AOJu0YwqIL6/VaM+fAFLMcHNSOlv06W0uT+zQMUhxda20RsjjY5pLBB7 kRgIoyaNxnyvhOZRSAb/q7FBIWbSMn+zM0QtIdyPfIbDMFsOipz+ZXzP96GSRTg= X-Received: by 2002:a05:600c:213:b0:40e:4d65:59c7 with SMTP id 19-20020a05600c021300b0040e4d6559c7mr587695wmi.244.1706257462826; Fri, 26 Jan 2024 00:24:22 -0800 (PST) Received: from [192.168.2.107] ([79.115.63.202]) by smtp.gmail.com with ESMTPSA id fa26-20020a05600c519a00b0040e4746d80fsm1129109wmb.19.2024.01.26.00.24.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jan 2024 00:24:22 -0800 (PST) Message-ID: Date: Fri, 26 Jan 2024 08:24:19 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 07/28] spi: s3c64xx: remove unneeded (void *) casts in of_match_table Content-Language: en-US To: Sam Protsenko Cc: broonie@kernel.org, andi.shyti@kernel.org, arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com References: <20240125145007.748295-1-tudor.ambarus@linaro.org> <20240125145007.748295-8-tudor.ambarus@linaro.org> From: Tudor Ambarus In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks for the review feedback, Sam, great catches so far! On 1/25/24 19:04, Sam Protsenko wrote: > On Thu, Jan 25, 2024 at 8:50 AM Tudor Ambarus wrote: >> >> of_device_id::data is an opaque pointer. No explicit cast is needed. >> Remove unneeded (void *) casts in of_match_table. While here align the >> compatible and data members. >> >> Reviewed-by: Andi Shyti >> Signed-off-by: Tudor Ambarus >> --- >> drivers/spi/spi-s3c64xx.c | 45 +++++++++++++++++++++++---------------- >> 1 file changed, 27 insertions(+), 18 deletions(-) >> >> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c >> index 230fda2b3417..137faf9f2697 100644 >> --- a/drivers/spi/spi-s3c64xx.c >> +++ b/drivers/spi/spi-s3c64xx.c >> @@ -1511,32 +1511,41 @@ static const struct platform_device_id s3c64xx_spi_driver_ids[] = { >> }; >> >> static const struct of_device_id s3c64xx_spi_dt_match[] = { >> - { .compatible = "samsung,s3c2443-spi", >> - .data = (void *)&s3c2443_spi_port_config, > > I support removing (void *) cast. But this new braces style: > > }, > { this style was there before my patch. > > seems to bloat the code a bit. For my taste, having something like }, > { on the same line would be more compact, and more canonical so to I don't lean towards neither of the styles, I'm ok with both > speak. Or even preserving the existing style would be ok too, for that > matter. > seeing .compatible and .data unaligned hurt my eyes and I think that aligning them while dropping the cast is fine. I don't really want to do the style change unless you, Andi or Mark insist. Would you please come with a patch on top if you really want them changed? > Assuming the braces style is fixed, you can add: > > Reviewed-by: Sam Protsenko > >> + { >> + .compatible = "samsung,s3c2443-spi", >> + .data = &s3c2443_spi_port_config, >> }, >> - { .compatible = "samsung,s3c6410-spi", >> - .data = (void *)&s3c6410_spi_port_config, >> + { >> + .compatible = "samsung,s3c6410-spi", >> + .data = &s3c6410_spi_port_config, >> }, >> - { .compatible = "samsung,s5pv210-spi", >> - .data = (void *)&s5pv210_spi_port_config, >> + { >> + .compatible = "samsung,s5pv210-spi", >> + .data = &s5pv210_spi_port_config, >> }, >> - { .compatible = "samsung,exynos4210-spi", >> - .data = (void *)&exynos4_spi_port_config, >> + { >> + .compatible = "samsung,exynos4210-spi", >> + .data = &exynos4_spi_port_config, >> }, >> - { .compatible = "samsung,exynos7-spi", >> - .data = (void *)&exynos7_spi_port_config, >> + { >> + .compatible = "samsung,exynos7-spi", >> + .data = &exynos7_spi_port_config, >> }, >> - { .compatible = "samsung,exynos5433-spi", >> - .data = (void *)&exynos5433_spi_port_config, >> + { >> + .compatible = "samsung,exynos5433-spi", >> + .data = &exynos5433_spi_port_config, >> }, >> - { .compatible = "samsung,exynos850-spi", >> - .data = (void *)&exynos850_spi_port_config, >> + { >> + .compatible = "samsung,exynos850-spi", >> + .data = &exynos850_spi_port_config, >> }, >> - { .compatible = "samsung,exynosautov9-spi", >> - .data = (void *)&exynosautov9_spi_port_config, >> + { >> + .compatible = "samsung,exynosautov9-spi", >> + .data = &exynosautov9_spi_port_config, >> }, >> - { .compatible = "tesla,fsd-spi", >> - .data = (void *)&fsd_spi_port_config, >> + { >> + .compatible = "tesla,fsd-spi", >> + .data = &fsd_spi_port_config, >> }, >> { }, >> }; >> -- >> 2.43.0.429.g432eaa2c6b-goog >>