Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2562513lqp; Mon, 25 Mar 2024 02:41:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVfxvocpIAdoJDzAyh5p2zyoTthxV8WDq2aZNyOCUMngIpa3aJisA6EMUFDUV8f/Uoih7b/bBXZrjrL8aax8Y83Rs2wtr2KrUDzqTyCQw== X-Google-Smtp-Source: AGHT+IG/xHkrVVuIjHsNvzNlxRg14g2rcByZzHijaywytL1N6fisqQ3FBcIdX5Nw3Mt7aFfXYpi3 X-Received: by 2002:a05:6870:c1d2:b0:229:f8f4:62f6 with SMTP id i18-20020a056870c1d200b00229f8f462f6mr6748781oad.32.1711359680141; Mon, 25 Mar 2024 02:41:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711359680; cv=pass; d=google.com; s=arc-20160816; b=RZ8Cp14S9axvaTPiJ2GcAAAQ8OENr2j4W2cOYznDW6MMGJjru4P6qe8Porle1hRQXe rKdERctDNmq5M5F6V3ELJiSbaKE0BvHjg9AKDrHbo6tmponu0kN+qULAt0AqynkbryMD mvz2hUsU2eQ3PN7yvDcJQrj8ZDqjqyyAgE8DnJlPXyYYh+w3P/TsgXp/cGLMqPG7Kcsi KMm2IrcbVa1rWho4fqguM6mTIzNxHH7mZBIM7fG8LBPZ143cyT0kmPcXOJfcQMTWNFxw +luUms1pFnGUT710DitlzWVR7nsGYhIAUK+vzR5LJ70/MrcMCYzYDNCXXpDGwBg9CkXP 7uug== 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=HuZkqai0XoEyjllBNI1XQ4jBQ0kpiNTZho1VRTP7IZbAI6AfCx9lfWFK977VaXEZRX XVEklT/kp1taZA8S6lnWN+ma/8Hg3tajS9pAu8Onvxfwo0GlQvVt3fx7ulOlKWJa9RCS 8V7MtKxJa8SiePH9QGFjYwRvrgrWA0DH2yJrJUefi1fON7ine9ZhmNpuSs9HTz0u8ln8 SwFC1RNI0vwGDUVPV9ZANTfbZdyq4k5s7P2Za3xRRbaG5H5yV1AJxXOWMFCc8mN3UvRJ QAf3JiWXHrdUMvWIU4lcdGmavxHQsPEGbpKuVdla4C45C1gx/1sQkHbgHMRE9sYxtnb+ fcMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="hDGnA/Mo"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115890-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jo40-20020a056a0090a800b006eab0f3354csi650895pfb.232.2024.03.25.02.41.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:41:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115890-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="hDGnA/Mo"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115890-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115890-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C63D029E03F for ; Mon, 25 Mar 2024 09:41:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5379C385187; Mon, 25 Mar 2024 03:02:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hDGnA/Mo" 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 049D71474A3; Sun, 24 Mar 2024 23:14:43 +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=1711322084; cv=none; b=qP1BEUpLeE4ahWCLaOjZZZBCuO1rHNhwSTMxsj5a/tvB4stBj+4UqZNQUcbOfuytu23sph2CrydpRbqP85VAK0T4Jbx6fQe9YK6Aa7HSjB5FFILvxp1nhJtAJXwmLDG2gsgkYqmtCxIb08PAGjdcPWHTx0+agDU4wsL1OrT7e9s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322084; c=relaxed/simple; bh=nt4DweudXrWSOOYE0nV/wX2peusxuk3T7M9VaEFEUOQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s+y3ifRBn7uqP/jqt+qCWWEiZpUz0x06x2MC1Uksif8BDdkcurdMxsk5ijG+HJ3z2Cpt3OS/5KI075nLAr5hSX/9GKwe9AL1wSbgjEhdstYXv+XHdmRD7NDqdW3e4v8ECw18Hh/fDkzKdw8iBGEyBxriWYXRESU9Y7pnKXRz+wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hDGnA/Mo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C5E0C433C7; Sun, 24 Mar 2024 23:14:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322082; bh=nt4DweudXrWSOOYE0nV/wX2peusxuk3T7M9VaEFEUOQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hDGnA/Mo4LMtQPtmH6m5lPJS2USWltfPqGe+foCmnwdGP0zi5t9qGWOTevx9zUgkO TGvIdoamWqhzJFGz39Mbgm8UaFruT/zCPYEjU8eCar0YgSziw304DVmz579H2eXX6J 3ARwp4AMAT6AhBm3DyUq0LYJH0HgZkYPYnjW/GPGV9DEvps+puZd/pr1+fonFQP9DL v/AJDcx7emIaRlOaQT+XTWFeMmbeoOHPtRi7HMHK68D/7m94lpJJ2xxVG4zhk96ndO 1LU4c4fM7xsfvZRx5awiXKaS604jCINFmXWW8NVQiMORTabtaf+b2iqUlv69JHivoY 99s+qh1Tpuorw== 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.1 156/451] wifi: brcmsmac: avoid function pointer casts Date: Sun, 24 Mar 2024 19:07:12 -0400 Message-ID: <20240324231207.1351418-157-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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