From patchwork Fri Jul 15 21:59:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12919859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF7E1C43334 for ; Fri, 15 Jul 2022 22:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5dIwz6sWaLMPQPtpHqrS9yPcNK/wz4/iL3kSZ/rTKM8=; b=bNSofAN05YOjEr OyNIfDyBD0j5et1+rvCrThUQzdBeFy+IAmhmVhLXEpHmzrAfUvClhFYN/hLY4CaWhexEcvVmX1JCJ I7Og4sy6vsqt7wLhVScQTfyACJAOTbno0bavhtf3d0qtc3VTumlDiHT47ZSoXiZriLkxPlbPgrj3O BajZMpkwS1d6NpZieVJCgPDICb4ANYEIqVncurx1sfqhrBvK/7jBlyXMFsTo2i1svlPTnl6Yo98wm D6/wwzkXwKYdfkJdk56FJErf0naEYu/52u/IuqZpxjiH6iHJMMcRXR+XvcGgmZlEm3EFZps9nTkhT gqRlfaHREoohj0w9EhTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCTwW-00Ap4u-Qy; Fri, 15 Jul 2022 22:37:54 +0000 Received: from mail-eopbgr60055.outbound.protection.outlook.com ([40.107.6.55] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCTNM-00AbL9-Mh for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 22:01:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ARGKlOlKvSO0vggmPQEEfnC2oM5Q3c5yVHbthFJCOVeo3jc0okxJF14XU5iZVw6P759GTaOLUC0SRGxkaxv47giQvYqODGo3ghHpjARWCva10HfWB3WoOKagJuLPx6s/utp5yazyWVLfbU28i2gMjmwHA70MWjQP+bqko/Um8FLe5f0i4v1YiVjdokEY44F/NzPf3fV/CORP7BDR/Xj7dBgDVcIVy9oTH686MYTXPfm0LS7h/dCjTc8wG/13X5shMEEE/TUdWWr/S9q1Gj9hMgDJN6f5cYXYcjSYFSn8838Tq4eZOkhKUxNFJTY+90yrvo2nNs9Cj/yDyyNLCpSG8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GCnkFbU0TAj16icomPgcXktaEQeVtiaAjBFYiBXhIY4=; b=gy+G7aIOexnC8fByjTuEZcHOioxyvqsdYx3Obpl7yTmW9AzEpDXY/DlbKmjLMk4q3ILPi0x+QNYOjZZL/EV6K/ZqEL/xwj4kqlJ1E1c7ZMSR+UNGS3GKyzjgWzcGLCYYnXkzgM5VPsuhB3vLvsGo5msbRQvGVCZ8reRw3WqQW42yoEEXjALGg+UflMmIFFtuCl6rM+UDFXFnVNEdJry3MReuIUEiIfludvXYngIjSRPZr3Vox8+wIkYyPpJg3UgZ0OUEYgiemgm7j31Pr3rUt3Yo0Uey+te61bwqBeyszKM8++LmlgO0VRQSnR5/C/FbM5gMXKhJ3H13FTlCqGoUFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GCnkFbU0TAj16icomPgcXktaEQeVtiaAjBFYiBXhIY4=; b=cY2ff8coSdCXGDYoeaJIRQTCWKAH+k9WeumqqfjISLTdVYalz21ZGXtVomtTwcj1l1BGFUT2bwHiFkTWlspykPm+bxGOchJPIgYfWEWDVYta0rMpdpLiwVC0ycf6aLdpilJ89LEf0zCi2ivLhOkltyN2XL3rspG7XQ4+JFm9/m0JYfVSVCmn1KdBjMtYvGuPlKaRn/5yxbvLyD1FGVjDRbdJbi4TG/q8/WbmT/9UeizYNPVoAf4KswjWVyYO21PinCBRNsWn7oVwYWsX1N2HaM1B8DVDZHEXcX2NCl4QkU7Q7kU2ChwR9jxKSdnAxKwS7wHhvAoR5v8m7U4oN63jpg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) by DB6PR03MB2902.eurprd03.prod.outlook.com (2603:10a6:6:34::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.17; Fri, 15 Jul 2022 22:01:25 +0000 Received: from VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::5c3e:4e46:703b:8558]) by VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::5c3e:4e46:703b:8558%7]) with mapi id 15.20.5438.015; Fri, 15 Jul 2022 22:01:25 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org Cc: Paolo Abeni , Eric Dumazet , linux-arm-kernel@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH net-next v3 32/47] net: fman: Specify type of mac_dev for exception_cb Date: Fri, 15 Jul 2022 17:59:39 -0400 Message-Id: <20220715215954.1449214-33-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220715215954.1449214-1-sean.anderson@seco.com> References: <20220715215954.1449214-1-sean.anderson@seco.com> X-ClientProxiedBy: CH2PR10CA0009.namprd10.prod.outlook.com (2603:10b6:610:4c::19) To VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 443fd466-fd3b-4e67-5c55-08da66ad8fb4 X-MS-TrafficTypeDiagnostic: DB6PR03MB2902:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zi0E5cBd8R8pmHB3ZZaoFdUmO1gPP8WxhYj64P2GukOw5if2lYUK2akcN9bCc6StgjUQUJriOMNMfwBPC6viql0GnCql1KIWoIiONE2ASBbEle0LIlOUhTDfc6lBMpyn+NgdMRvxnwE09AHMvLYxxacZyhIM/4MCy1pjgpcdp/swr4Arvw2wNdlSAqf7r0cZjuAwvn/iE+Ph7Ad0jDLzBO54SK//0j53NLgONI4azUyvZaP0yWsDkDBc1chPXRklm+pxTPUoB7z+uMGNdWjh4L3ZYevSTLl7QA1x2Bbf9q3aOmOYRBH2rwkMg8rbXxH4Te74vxVTl1Xmz/6DRgGrEYmSCreJyzE1cyf2KUflPS3SpAdJpnwIjS01iX3K+OPl6WIqHBpDcrl+fd/q1jjjequ5eFPbGdzzW7E7dY3AvoHS/IpeSl3q6N48RVYIXjJDAxf4Soo5Q4eeY3l1+aEHpvBL/coXQHii13SQ7C6NwhUqXLZ+ayqXnBin4xWHv5hZo774HjvIXOAFy/L4BUmOPWfky0uJG9MiJtONiWLKvYFZdPTsunZZwK3GJ/RqDNVFsCuQaOVhbgpub/wh0jcX9O8AjGabdSGlaec8s2G+GzXaudfuwL/b0IVzZ89JyKKwm9DeWfmaKWNg5DcfmKwrtV9/H9+306zDtDn5SJJwgOjjRtLVf44xkm3NCLfHi83VRCZm+ZnjRGmgFtO6GBCRvj8FUAeu+8Df6TIYJNaKBn0nCRpGjNSsVfDEO14PBxq5oXQU4RFoVNrnklB6IdmSG9x/PVZZeXTfFQSPY611cxyF7b0WO1hjTUUmsQh1T0A8 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR03MB4973.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(346002)(366004)(39840400004)(136003)(376002)(396003)(86362001)(5660300002)(83380400001)(6512007)(1076003)(107886003)(38350700002)(38100700002)(186003)(2616005)(36756003)(26005)(6486002)(52116002)(316002)(41300700001)(6666004)(478600001)(6506007)(110136005)(54906003)(2906002)(8676002)(66946007)(66476007)(66556008)(44832011)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ah9B7cwfqwMre55+ElsGIWVYuNiQXUlocxc8Rem8M74/dcSa4Fek8L15l/xV/2Kaz+HPf/w3DP+IOO1M9PoFCd7efygBmaZOETdefsI4xDrsyw9UJY6Sc5hlpvAABOc6F9kleuRBbXN6y0kKwc+YC9cOWVStMdkxUJ18LlU8uH4EpLVpAeOFQiqjqZ4kyHVTZbkYRKdPKjUsMZlRVWx8EpE0MLRnXh4ou0FicKr3yTpnnp4Hw4ocBzB95mhcxO4D00D9s7gj0+LA74+FurqaWtz7xo+IxlO41UJN6aa4AHZpSj9sguf4Ni0sRb1hZyZyGSD96yeZ9XpjbDJWL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IGn1rC9bRXxG9K4YHOxOgO3XgC/z1f3Ca+RZmG0TNq7KZsiBuekDwOC8mytHkXwcEVXb77yMSBWmXuVLUX8nmK/lOXaWVaj1DFPnODSaL/fG1AekNeJtByV8UVNLQBca7h1CBWHMjgPMMAl4zoxLdVxeU2pGBwLYeNAEdD/Hc1Y673l/6jmawuJqt0FM6VjYdQ42ziqWZR57mhfJZqQvfXw== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 443fd466-fd3b-4e67-5c55-08da66ad8fb4 X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB4973.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2022 22:01:25.3933 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2QnK95Cb5Af4zr1KLS6ELQPTGSkOYcHL8xtOTT4JH4s95Huc+ilQBvCdgJ/bpM7XCKLHekuwOY2TGd2W7E91BA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR03MB2902 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220715_150132_806531_78C124C1 X-CRM114-Status: GOOD ( 12.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of using a void pointer for mac_dev, specify its type explicitly. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v2) Changes in v2: - New drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +- drivers/net/ethernet/freescale/fman/fman_mac.h | 5 +++-- drivers/net/ethernet/freescale/fman/fman_memac.c | 2 +- drivers/net/ethernet/freescale/fman/fman_tgec.c | 2 +- drivers/net/ethernet/freescale/fman/mac.c | 5 ++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c index 09ad1117005a..7acd57424034 100644 --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c @@ -301,7 +301,7 @@ struct fman_mac { /* Ethernet physical interface */ phy_interface_t phy_if; u16 max_speed; - void *dev_id; /* device cookie used by the exception cbs */ + struct mac_device *dev_id; /* device cookie used by the exception cbs */ fman_mac_exception_cb *exception_cb; fman_mac_exception_cb *event_cb; /* Number of individual addresses in registers for this station */ diff --git a/drivers/net/ethernet/freescale/fman/fman_mac.h b/drivers/net/ethernet/freescale/fman/fman_mac.h index 730aae7fed13..65887a3160d7 100644 --- a/drivers/net/ethernet/freescale/fman/fman_mac.h +++ b/drivers/net/ethernet/freescale/fman/fman_mac.h @@ -41,6 +41,7 @@ #include struct fman_mac; +struct mac_device; /* Ethernet Address */ typedef u8 enet_addr_t[ETH_ALEN]; @@ -158,8 +159,8 @@ struct eth_hash_entry { struct list_head node; }; -typedef void (fman_mac_exception_cb)(void *dev_id, - enum fman_mac_exceptions exceptions); +typedef void (fman_mac_exception_cb)(struct mac_device *dev_id, + enum fman_mac_exceptions exceptions); /* FMan MAC config input */ struct fman_mac_params { diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c index 2f3050df5ab9..19619af99f9c 100644 --- a/drivers/net/ethernet/freescale/fman/fman_memac.c +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c @@ -311,7 +311,7 @@ struct fman_mac { /* Ethernet physical interface */ phy_interface_t phy_if; u16 max_speed; - void *dev_id; /* device cookie used by the exception cbs */ + struct mac_device *dev_id; /* device cookie used by the exception cbs */ fman_mac_exception_cb *exception_cb; fman_mac_exception_cb *event_cb; /* Pointer to driver's global address hash table */ diff --git a/drivers/net/ethernet/freescale/fman/fman_tgec.c b/drivers/net/ethernet/freescale/fman/fman_tgec.c index 2642a4c27292..010c0e0b57d7 100644 --- a/drivers/net/ethernet/freescale/fman/fman_tgec.c +++ b/drivers/net/ethernet/freescale/fman/fman_tgec.c @@ -180,7 +180,7 @@ struct fman_mac { /* MAC address of device; */ u64 addr; u16 max_speed; - void *dev_id; /* device cookie used by the exception cbs */ + struct mac_device *dev_id; /* device cookie used by the exception cbs */ fman_mac_exception_cb *exception_cb; fman_mac_exception_cb *event_cb; /* pointer to driver's global address hash table */ diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index 0f9e3e9e60c6..66a3742a862b 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -41,10 +41,9 @@ struct mac_address { struct list_head list; }; -static void mac_exception(void *handle, enum fman_mac_exceptions ex) +static void mac_exception(struct mac_device *mac_dev, + enum fman_mac_exceptions ex) { - struct mac_device *mac_dev = handle; - if (ex == FM_MAC_EX_10G_RX_FIFO_OVFL) { /* don't flag RX FIFO after the first */ mac_dev->set_exception(mac_dev->fman_mac,