Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2372350lqp; Sun, 24 Mar 2024 16:21:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2tjaaZIRHTg11vPlAu7XT48ZPVTWuwc/UOlUEBvW01bMhVSSVg5kPr0Xk+9Weyh87UxZClDTAG/QUYqB/wCFalLbwAp27wuEzItfXrA== X-Google-Smtp-Source: AGHT+IGPELe3aaJZQ6hykNYBYkRaW7r7baro/W3MCfIv/1i1JmTDFdKQWi9D72f1r1QBci2Tn7YJ X-Received: by 2002:a17:906:b0cd:b0:a46:70d1:dda6 with SMTP id bk13-20020a170906b0cd00b00a4670d1dda6mr3443603ejb.28.1711322490046; Sun, 24 Mar 2024 16:21:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711322490; cv=pass; d=google.com; s=arc-20160816; b=PLcfWHsPyhRhcjsqyyENlHc/7obJ+AmrJkqQMBtOZ6F1dGQe0ZIAKg0ZmBZBWj4hyc XxlkGB4ABuzu+N4CsCdEs7fa3EYgjpdOilq2l28ijH46psGoDZPGNaKWjYPVk7gKv0cV N7jDJUW/roQ2XgH1PVcq0R/l67+CJx6vAYr0gmQkz8jE9PBQ/jKhPiBvOieF0ZDiZk5V iWl+HYo2tXGJNgiDynP10k6RS7sA7V8Bo3XgWd0KNFhXLnSfBPYaERTX7HlK6qvd8nT8 khLDItRM+9WWsbYQuP7Yy7ZNP4pIu5PykirIwX6aDrUBysX6ZfDYOn59NZDgxNEgGt9Z foNg== 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=o6VrLwHXVJR599ATGhdEnRsP6I3vaNAC8FgHR0kADVwBKR9SOKIdrQQzuJyePqi+mx hXG9ZlfP7K4INlUIBzgV6qxWiO6FfSUCoD/YtelVrEuDlSc8OPuJZZYoORmXlTwLdGfC UtPWjQpQwAnLgUvfNcBNss7mwcKA984uzYNwzvWdUWFPLIYMlPdeggYw8Y159e7uZ+1Y whMLktDOUZstU531yVNwwd9ijc9OBDBnoWDH2KIqvD9sjNWha7wYEMbs3Iv2z82suVYL EHHMdUwi/SXaVVJI9JUqzthdd8nNIWmsum6MCSwVT9uQgvgyBQhyQxJ0a1W/89CElJYk /ZeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cy5TDY5Q; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113099-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l8-20020a1709065a8800b00a469a59d984si1976870ejq.469.2024.03.24.16.21.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:21:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cy5TDY5Q; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113099-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 984781F20F23 for ; Sun, 24 Mar 2024 23:21:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2586C155300; Sun, 24 Mar 2024 22:38:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cy5TDY5Q" 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 376381552E7; Sun, 24 Mar 2024 22:38:27 +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=1711319907; cv=none; b=Ex/vhdTmRswlXMAIRrg6zOAYQojhnDafs/UrZsojuMZB+DdlOOTkBLdgifpOYlc6/drVV2VnHtOxzEw3SRwArCZsE9JfEgAgkdpXeXX4PX5GjNZo3VPA366AZHlZuDakgEl0fVPqiLhAxEJb9O2g/URsbgBA+9wOe9z+uEd7Ugg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319907; c=relaxed/simple; bh=nt4DweudXrWSOOYE0nV/wX2peusxuk3T7M9VaEFEUOQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N6WPK3FO/TtJFd0Oi2kuMLprUUB3SU1klixNJF9hfGD5M3IIXD9MbMP2NcqBlk3dGk0m1eSIJjflio/ZFK4XSbBRwWAn72g90VOMMPqTjIOvdscZYX+QNPDgJE8YtALk+jD4ntfCHeULfmttbIrFegLEAD1+oJ/588HM37s9TMI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cy5TDY5Q; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54487C433C7; Sun, 24 Mar 2024 22:38:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319907; bh=nt4DweudXrWSOOYE0nV/wX2peusxuk3T7M9VaEFEUOQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cy5TDY5Qfv/Hsrl5a1b3g/a213zzkojhPidBDavYHC73ZPwP9XBxpNYYB08vUjp57 tgBXM6kC9UMw57zxuzWPsIfxuK4NJ6RiL81mIMc8BVGxJyZ4Rs5GY0aD9h7OsYN5bM RY0JLhhZVIFnkpaOYkSE7MQf///0vFgsOOR9wtGbHQ8Rhl892YZTvizlnHc6ZCRuah 2P0SoHUyZDm8jqHMVSVUf9kXVE8223A79ZTC0lousvZrLcpT66l2LGEkScPovJ7jAF C2fmdGEyH6fby+uDVb6hl0lyruFjHcKt27o0VuBwWSNP70iI1oLkuR1/zEaiZx/rlD nxDthxaGgcs7g== 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 6.8 212/715] wifi: brcmsmac: avoid function pointer casts Date: Sun, 24 Mar 2024 18:26:31 -0400 Message-ID: <20240324223455.1342824-213-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-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