Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2576207lqp; Mon, 25 Mar 2024 03:14:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUU7itMGvDn/iCkK+bE5abbt6GK9WmfOYC++pmBnceG3aLOySadaw1UT9R451gwvfRyR7WpjN5rhkG4uWrc4UIBwYEpOWR8FxMgts8lNA== X-Google-Smtp-Source: AGHT+IEC4Ag9VZXTa68iALEjUPsecB/NHWWEWZzwomS6P2gv2biK8hHh13kHuAcBkOFv6xtyqSq0 X-Received: by 2002:a50:cdcd:0:b0:56b:d1c2:9b42 with SMTP id h13-20020a50cdcd000000b0056bd1c29b42mr5645325edj.29.1711361684878; Mon, 25 Mar 2024 03:14:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711361684; cv=pass; d=google.com; s=arc-20160816; b=Sa/qbAYmRSQ7ALhR3ELgSWy77EMAGfyP6D8rFBoCLgYYXT8eSpWKIKr4Y47QA5FHU3 gGTwJoO859RycBRKQrd+mhKZHzSscbLLYsT8v4/tYpXf4fr/na7/COqSigxbHlSlEhQN cIqp6MMaYnfy1cLSHU0S+OBjxG8CHi+lMGdYOarpwTZZ935AIY2LEdFQFb6MWRQHCk5Q VUEjhzesOvh6g1gEC0LxjMitMHvAXvhd9N5iZD7q+rMuYgNaPpFMRi/3Vf3cEqajKi3q ZWc0AWQcCwpFHrTITL0acC+CkmKPcY4JNZCeJ+ZAa+uk1RPNfq7zKoljOOSjJfxe5ckj 0mUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FgITSOOoDRG1KDjXKvC/FXNn6OA63V5qMI8fvNEKor8=; fh=Gu/BhI62dG5yKvK/BIJGRlPfnOU7293DgrDfwk8dGN8=; b=OUJz60xYbkvYTr18qaUN4sAKCJhPMeHycb+MQFgJVksiB6YDqVfox4Z4iHjWK73O9P BVoYQM6YVoXq+UUvRBVoYBcjlvp34SVQ6KdYwqCy6XD2IM8B42Mk8f91RhOWrViBO3wo JdFkr8kogZ9/M3NTMxXzjkQRprh+hoHPhVEDEybutVeSPTzij6YKyX4qMxMdCHbU3MvL aqj8EFC+Lo4i5X1LmllAcAXhImvkoMUC3JttMaVkt56M8xQqGgJfvz5qQ1fayuSUhArF XFW6BycayqITexG0VpB8M3+CRZx3jwYkHZ5BopX/q2r5Co5oGDu2oyS4HilqFpzjOKpb 3CQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i8a71KtI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116147-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f19-20020a056402355300b0056c0bacaa0csi1049234edd.460.2024.03.25.03.14.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:14:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116147-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=@kernel.org header.s=k20201202 header.b=i8a71KtI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116147-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8D5D81F31F54 for ; Mon, 25 Mar 2024 10:14:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76E4B3B1192; Mon, 25 Mar 2024 03:32:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i8a71KtI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFDEC17A92E; Sun, 24 Mar 2024 23:41:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323698; cv=none; b=qV7Qi1NoGZcrZNtFyidJbChx5g6xbtFL5GbkdkORvl3oiHhj7izRbiPY4JZrhrzZkGsdYnsDBZBbJ//jyKGoZA/m8S9TzVklSHvM9pLrv1ok7cNLG243z9S6uvXSTHYb6cqVqK+z/uxNTA64FC/yTFzQY8XiM1X+063E4tLrMTY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323698; c=relaxed/simple; bh=nt4DweudXrWSOOYE0nV/wX2peusxuk3T7M9VaEFEUOQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UIDEPzYZCoqwFbHwFzmDmiBbfIGWDIiTPKwf11g/d5e6Ab2o74i0AGARMflzFZgyFg0zDnMDQ86oOU3GpE3Co6yIfKMQ42vbym6UGQnguZS1gEIJCq1Io4QI26SzJe49xy2T+S1Vv4fDKGxjwsxS8NrTPPKQL0VKFP4PvJ0FANU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i8a71KtI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF965C433C7; Sun, 24 Mar 2024 23:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323697; bh=nt4DweudXrWSOOYE0nV/wX2peusxuk3T7M9VaEFEUOQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i8a71KtIAD/I7eTyxLDJ97QBm0a4SSnvuseIxjDofvuXCmXvJIMcfm4Oay9x25+Tt GA5A0kOcDw0NRxQnnksure48VCivAypTNXMGGxhdLqyoEGe7Uc0L0SXrzJtBio5E6L 8XJHqfXXLaCNS5vd/eMBYfNa/4U0Wus8k0WzGb6lrc3GtRP5rJFSI9Y2d/ZDIklwKX IMGo2eliwDxejHOO4JRwCoTTUNB6quG/osRmy+3bywmmRCuK+3D4d1ky08FACJfKxt 9JDxURkz5RaCgrNr9OEcb+ab32D4/fcNp88oRgqOdqmppUEnYae/gGkXolX8Y/SxHy Ec/sW0FGJLC1g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Arend van Spriel , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 070/238] wifi: brcmsmac: avoid function pointer casts Date: Sun, 24 Mar 2024 19:37:38 -0400 Message-ID: <20240324234027.1354210-71-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Arnd Bergmann [ Upstream commit e1ea6db35fc3ba5ff063f097385e9f7a88c25356 ] An old cleanup went a little too far and causes a warning with clang-16 and higher as it breaks control flow integrity (KCFI) rules: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c:64:34: error: cast from 'void (*)(struct brcms_phy *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 64 | brcms_init_timer(physhim->wl, (void (*)(void *))fn, | ^~~~~~~~~~~~~~~~~~~~ Change this one instance back to passing a void pointer so it can be used with the timer callback interface. Fixes: d89a4c80601d ("staging: brcm80211: removed void * from softmac phy") Signed-off-by: Arnd Bergmann Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://msgid.link/20240213100548.457854-1-arnd@kernel.org Signed-off-by: Sasha Levin --- .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 3 ++- drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c | 5 ++--- drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c index ccc621b8ed9f2..4a1fe982a948e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c @@ -383,8 +383,9 @@ struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp) return sh; } -static void wlc_phy_timercb_phycal(struct brcms_phy *pi) +static void wlc_phy_timercb_phycal(void *ptr) { + struct brcms_phy *pi = ptr; uint delay = 5; if (PHY_PERICAL_MPHASE_PENDING(pi)) { diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c index a0de5db0cd646..b723817915365 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c @@ -57,12 +57,11 @@ void wlc_phy_shim_detach(struct phy_shim_info *physhim) } struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim, - void (*fn)(struct brcms_phy *pi), + void (*fn)(void *pi), void *arg, const char *name) { return (struct wlapi_timer *) - brcms_init_timer(physhim->wl, (void (*)(void *))fn, - arg, name); + brcms_init_timer(physhim->wl, fn, arg, name); } void wlapi_free_timer(struct wlapi_timer *t) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h index dd8774717adee..27d0934e600ed 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h @@ -131,7 +131,7 @@ void wlc_phy_shim_detach(struct phy_shim_info *physhim); /* PHY to WL utility functions */ struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim, - void (*fn)(struct brcms_phy *pi), + void (*fn)(void *pi), void *arg, const char *name); void wlapi_free_timer(struct wlapi_timer *t); void wlapi_add_timer(struct wlapi_timer *t, uint ms, int periodic); -- 2.43.0