Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1523218lqg; Sun, 3 Mar 2024 14:35:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWzhH5WpJ3GtuVY3Bd79+6RkYA2GbzKLtZZLPcx860DMGK3ko8sO7GqQ97FPviwflxTJEZODy6ypjRTAmGiSJ4Q4WO4VeksZROaQ/1ivw== X-Google-Smtp-Source: AGHT+IFUGwQCH352+/j4RcqMiOs0uUVgTb7ezzc9HXW6TN0ij0w2t+Rd2r7wl8vY+ZXz+pvkHyI6 X-Received: by 2002:a05:6402:3588:b0:566:93d9:a184 with SMTP id y8-20020a056402358800b0056693d9a184mr7935731edc.7.1709505311956; Sun, 03 Mar 2024 14:35:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709505311; cv=pass; d=google.com; s=arc-20160816; b=j42t3kO/KqVocrXsTGDGu6y52blvJl9oSrmUIiKTxlJKlKY1w0ZuBt5xCQpILid8ej SuOntl323qx10g9OlCp0Z4RoDqhKbLzC4ujEmvy0Y/wx24TwYroKqGmwqAybPAdiapYq 99PvYAC62idxib/ECyBJFz8l9ywnAJW+dLzm9cmymjFJ68VmHXMqi2rdE8GT+jcyjicB TT42SKqW3cGJEiwNIx5iJDPZMX0J1cQujvmSJOjBKMoMRbtaxQ+EvKkjrKcRHEe9r1YW AhNl/11rSQXHQdmQTG+ElXwXGraT0F3PX+FctJkkU/WhR6jJ+5rdn4RIZGUrcbwUGDPC THBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=/tNlHdcdou4LPuSKHe0Zuh/h9dgjEfE6QEyEmebUH3A=; fh=tTNRp31HYNC9j7gAMJcii7XSMd+NiP+gjaUHH4GF3Ck=; b=bVR3xandZTB7dNDx3DLbs5jIYVrYgvfBm4kL7VtVxLsh6YfbYodk+RQsNnSkNwL/dx VJVtR3CS6jjVSJUXXeRReVh8IVCDlILltPhRa5ckwLi9HkFCAMCkhquzGtbdNec/MRqN eT5pXLCsvARrtoFtxg+Px7tkN7p8BqvBJ9ALzaAV1R9JXy4fvIMiBIz8OUsulfHPxcQd RzSdQXiWM3Y4wH1O/ufRwUp5J257ybdipvSe2sLQKVA+Lppjx8UFvqWgb3b5JUTTJD6K huXOlq9vInHDsup+1fMIy0t/+eGFdvD8+doY9ZbeBTqzP/9kxjUIuw167L1j7f9ZO7g2 vovA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=A9r2KHlD; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-89931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z22-20020a05640240d600b00564566672b6si3351260edb.303.2024.03.03.14.35.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 14:35:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=A9r2KHlD; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-89931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id ABD391F21583 for ; Sun, 3 Mar 2024 22:35:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E29317A73C; Sun, 3 Mar 2024 22:35:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="A9r2KHlD" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 7A91A6CDAF; Sun, 3 Mar 2024 22:35:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709505304; cv=none; b=rC+4ujUPad4xDsti2DYhsbKPU8dX/Ais/DajWoEvuRedNA9XMA/t2LQcIzCU/fOpUDUvD7dj3DyED4OCW3ZPc7eYnT5psz9nqMCd0dd4mysTk1bA7PoGIlNrkFstNuTJigSlJUvV3DCoWvE2HFA2QmzWpGIDIxDu3vWrTawoSzg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709505304; c=relaxed/simple; bh=DGQR7yTAjvJgIlGiMzFgGM447krkPjSSGe0AV90aCFI=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=sit2fFn2HxDoEAhWMCbSbsQTWA+LECq3rJQm1g+0nECZwRinrSmEWh/l3zk9BDQF/NKu+vwF6z7Ee2SsRkJK91gi0Ml2G41Z22tZwyks4bR5B3ywdoEuVcExUN/fxkGxCRQ2mx8d2Mm2L19Y2/Rh4ByELlbZlDz8RpsL+EkVHRI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=A9r2KHlD; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a3ddc13bbb3so819480866b.0; Sun, 03 Mar 2024 14:35:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709505300; x=1710110100; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=/tNlHdcdou4LPuSKHe0Zuh/h9dgjEfE6QEyEmebUH3A=; b=A9r2KHlDxTQ16/xABfYuNNvh6Zq/dg4OHfJHFxIfqW7e3QaoIqKqSOaQ5CYrxZIxLo geOmfbTG9qxko4Tth3B/ZDQVzzBYSjwwJW/Yg2S4sdtxLN2ARicQz172XQ0b7lkOEPHA /R7Uu8stao1ZTAEQmDBOa82420VD0qIlwqeFUKaDSclr6AKAPyVlgKk9B+/uePkxf4ve BAcpDWEbmIDLLcD/6i3KJFD2sKpFnoYmmdN2VTxvNaPvHw7cNhVqbECyp5xDnXP58pcM q0UMU0OgnxtbcvpzFbVlSeekp9xUVY0L6CKTZMS6ZUgzuZWQs1gEGIsDQmQkiR4O8UM7 KcyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709505300; x=1710110100; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/tNlHdcdou4LPuSKHe0Zuh/h9dgjEfE6QEyEmebUH3A=; b=rpeXVXnCHW1o+vciH0J1EFshw+nGpegB1kGSvYolPxlI4ei79OkwM1+qSsdH1gwAe5 y98EIFzm9KukJp4+64Abp3KVIOym3pXBOw9ucbKFoajkL2iCuWxDUP0x+Jen3dCBb79N fuZSGzF04OLIFao8lwF5vSpC60ZcGvbJwIXubvqV+i97wHVtyNDwhRQ+8lXhduw6MDJ9 PvWg76trBfIGN20uxz9J8SeZznqEjrEr/L0sNIxRUxV1+qN+uoRlppOm8dbNZKUERKn0 nunUTnVrI8m2zf/k0w/DEXXgE08wzTcqhJBfKKHQ3Ts+6SGe4mevp3vhcxZb1ZI1PNcM qM4w== X-Forwarded-Encrypted: i=1; AJvYcCVzuQpQiimdxC1ztrfS4AmkiIZMCJLmoEy1JA41Hlu4VHPn/FdXTmc17NEayyD6pyFJTzPw0aG+pdBvG1Lo+b9/VT7okYkJYiji30y/NMnja9tDza8SQtyCl6dIqYcDsGLDcd5nJeiU X-Gm-Message-State: AOJu0Yz9DDsAO8NsGs9K8XnIU0OgZT6fvswGzjIhhS/AQHilTPQhpyG+ JKR6t8KoVdXMlXN4wHgjji/L3a+/Shr3qG8VjQzTBxSxsu4F4iUasHBIX6gOR3H8Yw== X-Received: by 2002:a17:906:c2d1:b0:a43:74fa:4f08 with SMTP id ch17-20020a170906c2d100b00a4374fa4f08mr6545593ejb.9.1709505300053; Sun, 03 Mar 2024 14:35:00 -0800 (PST) Received: from [127.0.1.1] (2a02-8389-41cf-e200-b3d8-5b4b-5188-4373.cable.dynamic.v6.surfer.at. [2a02:8389:41cf:e200:b3d8:5b4b:5188:4373]) by smtp.gmail.com with ESMTPSA id v23-20020a170906565700b00a455ff77e7bsm82204ejr.88.2024.03.03.14.34.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 14:34:59 -0800 (PST) From: Javier Carrasco Subject: [PATCH 0/4] Drop casting to void in dev_set_drvdata Date: Sun, 03 Mar 2024 23:34:38 +0100 Message-Id: <20240303-void_in_dev_set_drvdata-v1-0-ae39027d740b@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAP765GUC/x3MQQqAIBBG4avErBPMWmhXiRBp/mo2FhoSRHdPW n6L9x7KSIJMY/NQQpEsR6zo2oaWPcQNSriajDaD7nWvyiHsJXpG8RmX51Q4XEEZtkuA0xaDo1q fCavc/3ma3/cD4xEpa2kAAAA= To: Arnd Bergmann , Greg Kroah-Hartman , Michal Simek , Jonathan Cameron , Lars-Peter Clausen , Lorenzo Bianconi Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709505298; l=1396; i=javier.carrasco.cruz@gmail.com; s=20230509; h=from:subject:message-id; bh=DGQR7yTAjvJgIlGiMzFgGM447krkPjSSGe0AV90aCFI=; b=AJ1cpYmZ0AZHVstvJ+M+lXezwyXXWXlb0rdJxX9HWXNJSCLixeSgYE/xz9vhpBcm7ZQTdBLhu dJbuK5EeZI7DKAU4sbZlLbVnW8UtHY0dLgmZKjIy0TpxQGZmCfPrHko X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= The C standard specifies that there is no need to cast from a pointer to void [1]. The vast majority of the users of dev_set_drvdata do not cast their pointers to void, and the few that do so should be fixed before it spreads by following bad examples (which I was about to do here [2]). The very specific cases where the cast avoids warnings (e.g. droping const) have been kept as they are. [1] C Standard Committee: https://c0x.shape-of-code.com/6.3.2.3.html [2] https://lore.kernel.org/linux-iio/20240226-hdc3020-pm-v2-0-cec6766086e8@gmail.com/T/#t Signed-off-by: Javier Carrasco --- Javier Carrasco (4): char: xilinx_hwicap: drop casting to void in dev_set_drvdata io: light: st_uvis25: drop casting to void in dev_set_drvdata iio: humidity: hts211: drop casting to void in dev_set_drvdata iio: imu: st_lsm6dsx: drop casting to void in dev_set_drvdata drivers/char/xilinx_hwicap/xilinx_hwicap.c | 2 +- drivers/iio/humidity/hts221_core.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +- drivers/iio/light/st_uvis25_core.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) --- base-commit: 90d35da658da8cff0d4ecbb5113f5fac9d00eb72 change-id: 20240303-void_in_dev_set_drvdata-2d8cae908e49 Best regards, -- Javier Carrasco