From patchwork Mon Jul 25 15:10:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12928224 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 65C10C43334 for ; Mon, 25 Jul 2022 15:26:20 +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=L0/kwvw0xyV+mX58fsa7kbiro9ypdpjH29AkUBbiq9c=; b=sW94s27JV3NKAx IlIBbHFYRqmCGLkF6Rgcm1d6prjZyxxsxdaKxh+fEdNMn90hdyRbQ3XRMpP0FiaQuWWIX5gWpb6C+ UYvunzGngtP+pYEx5c9s3NLYq9AHXIIzVpIzMBCbtTSfCYcdo9VLRaJ5aOGdChqd51DZC5kQtXxNF i+IkldLflzqJAjf34HoJTz+xNa75cRopmNJEPPIDpHiIYoh6QhPfg1l2R2JcabEyRvQCw7UdRdfa0 QAJgi2SGbcDUyOVxtkFrHpmATb/Ym6ItmOnKp8bb/zMDSV3PWTdt3rM6qp+GkSiWoI/arxl0Hm75j 2KXCBWoEGOCtVQXNQF3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFzwV-00FL86-G1; Mon, 25 Jul 2022 15:24:27 +0000 Received: from mail-eopbgr130089.outbound.protection.outlook.com ([40.107.13.89] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFzkC-00FG5l-D4 for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2022 15:11:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YkDNgMzjXgXvBCPg9x7c/Fbzzn6AXOJCOUTAlvIe9r8A7HoRicBX2gK7qwFbGdqq5FNwucXemP5BH0ea/sJvnU3g3Ov2swixIjqPXezu0R0E0L4xmyZsmwqu8RdtDiwj3tIk6UnRimLy4HgGYir+hdzLd20hpTl9vzu4MySqfWINC3oOz7ZnnkZpuXDnoIJdS6mmtLyR0TJGbx10w4Apn86pYFv+nTXsDkZsd9gdi7ZItMgX6A4yuC5qkroxzJsC7TvLciCr1NliHIGZ/Uh0hWBhYtYrl3f/ACYdrdlLjK+S+f8YtrAZVoxpRPrO0ByobUkkhmr08xHtLFpaZ+aMyQ== 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=mo9Km00Er52i6dULb9Rb7HzPOzetPkenFipzAOcXWgc=; b=e+dMKIwrqHzljlB2DY65R5hgevqD9kSY4TTKjL1nrt+Z6W3QqWs6tmlL0e6L1Xr6M6ePXea0+Xgi5k/SskNXHbt3PM67A1LbJvym4GIs8jeA6xTWWLgGrzw7TQXNFlDaDy+PVpgf4jxj28Tn6URVgILCs0VsCtU6pr/UnOA8+hC2rsgHuJYQeCrNQB0zqCve5jI078KlyTHG7UOqmenxDJo2aQhPY64UnAks1xeWEk+owxGjN+zw/1d1rG6+1xtlaEgkodatYouF6W5IyT1tugXvbQT/QsJYA8rKUKyMNp4FOsIdxfu7GKDT/lt7rN075pxNe7MNLvagYn9j/evLvw== 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=mo9Km00Er52i6dULb9Rb7HzPOzetPkenFipzAOcXWgc=; b=S9+2UYRobBIoLbglw4gQls38OmgdYh7akp7t/oRuHkPW7AwDtXC7LnvaJVSvCQmu2abHoIbOKqQSavl/p7wwQlE1AF9QhxDOwGmwoyFIIAqad405e5rKz/PI7I5LLo77mz1nUv1RxnKT8iT2i6FP+kmfzLlSK4G4luEnLaApGF54tkJDZv2J/CmHko2llw2XAixUSN+T4c4ESQY7cu8WMC3IFQLB+gPP07Z38PU9w+JaoB4LWfRhdnis3GbP/0K224j4KvsQahIfHykf05UDbBtCh/DqQELVmUe52Aqu8GnNbe45qDxh2l1zLN9wkbz3Fv24XhJw3ixuu6nYpSrEzw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by DB7PR03MB3723.eurprd03.prod.outlook.com (2603:10a6:5:6::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Mon, 25 Jul 2022 15:11:33 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::59ef:35d2:2f27:e98b]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::59ef:35d2:2f27:e98b%4]) with mapi id 15.20.5458.018; Mon, 25 Jul 2022 15:11:33 +0000 From: Sean Anderson To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, Camelia Groza , linux-kernel@vger.kernel.org (open list), Madalin Bucur , linux-arm-kernel@lists.infradead.org, Sean Anderson Subject: [PATCH v4 19/25] net: fman: Specify type of mac_dev for exception_cb Date: Mon, 25 Jul 2022 11:10:33 -0400 Message-Id: <20220725151039.2581576-20-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220725151039.2581576-1-sean.anderson@seco.com> References: <20220725151039.2581576-1-sean.anderson@seco.com> X-ClientProxiedBy: CH0PR03CA0229.namprd03.prod.outlook.com (2603:10b6:610:e7::24) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a9fa7e21-5c4c-4351-3215-08da6e4ff5af X-MS-TrafficTypeDiagnostic: DB7PR03MB3723:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 95/XWpIES0h2bX8uBqoOsmgrOT8BEXRXf1c0bMlaQk1yxvefwFEmHoJJhCSKkaXkGRYlC+dM28BFGvvHVapEYHoH9yszcbIjqb9VdxSHRM7Ahm69guCsuYMxZx/1IQM7GWvzXCLoQwOxF2MiNpUSjG3d+XFbG/ckNGzubpw7ouuMu0aQUpnMmHAty1IqKH2MbxrDArSjTZlAOHpjsQXNb1fyw9WTUqiEelAYiFDd7DfaQDU94gDJgPvGRzEFhTf2ptXkPpFkGImzcHAzBNQHvDZf8RzWT15Fhak9R1mwvl8h896te08QjPuKj23LNdO+XRPmZXxlen+yAPX2yO3ZGUB68ok8bttt43DQhsfGzzsSpdEWFIUfc+uDc0fFCnnm82bLYPrpEXodRIOSvsiWGaxfdZQaesKDuUE0r5brOLoFVrK3KKEL3+n1tyy2EAKNFctesDWpzS4fPiqBpZ3Kvblimh/we4T0tF0xPE+b4dYfU9nwyXiNMKmjAhctdLq9H2SsVCgEoBFDq4U9k55bwe6jsIaA3gH2jRcgfb+xiYX1963D8Tty0tRFpUlg6B835hJBvxEdMFzubGTh5r5xA3natdKPHjltEDpTCyVgYCpen01WxJwDriTVY4ZZNPAqz1CAirQfq10bq3kcbJ3m/YkDh+ibzWONFP7vo6yOL6lt/Tp6Ymi5ClqS/OiVNTiclMAvjdcg2x8BILjZAyonZDw0gZmVUuJBMXsCKFlNIngTGGwda8iw3DnIn/cfEpua8P+XaJkB/stcc4R4I3LsNd7Oq8nYTqOfcEz0SeFWqXo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4972.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(136003)(396003)(346002)(39850400004)(376002)(366004)(186003)(6512007)(2616005)(107886003)(66946007)(1076003)(316002)(5660300002)(44832011)(66556008)(4326008)(66476007)(8936002)(6506007)(7416002)(52116002)(54906003)(110136005)(26005)(8676002)(6486002)(2906002)(38350700002)(86362001)(83380400001)(38100700002)(36756003)(478600001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9IcOB3IiRsm4kahgWzQKp7yBOYe5x+giJO3gUofN/A0pbH7wYCw0kHamwIQYg6sqJ2LJwWlf0IjxU0438Iz1TZWj0mHsjVbazmC8SsiyjbMD3ymm0dhivVD8zJRh3cZIFZriPkfiexZGSMyCO+oP1uQcwyX/sNvhS8iAIgBEeRTy2nmBuqryeMx1T9Ir2pp6pLs59Qj/1pKQfacvlrMc1u0FEsFEd9LhM6tv2mgP/d08iLx55I36IXZkkeN9x0D8LENhtDKu9Xo+BLFEjtLdH4EGVeO6bPpaUtQizKcYA5zmefd7ZkT1G5SVpq4r4gr+T9ml2D3vN5934kOMNc8rHHxKThLG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1FPnYjxz01M6da86S/SPBGxBHcSaG0t1gBf0WnQj3wETFLwfFds3OlBF50vSqLX/CGtFoar1WPDC3qUZfauPw4th1+s9XCjU5h0l6eSah7ympZJURxWXviMaX/yPZaaWIB4G/3vJILLdhu/lXIF8SM7fH27b3jaZneg8Ru34LDkA96kC5Z/732ouJJzvQtQOfsgYIfTdsRjHcFQ== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9fa7e21-5c4c-4351-3215-08da6e4ff5af X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2022 15:11:33.1280 (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: v6k/RZMLXov+cfD4tI6KrkSZo2ffj7fVRpEtCm5xdF7Z17TZE8ofj+ziYI1IQz9LoAy7bI3vQfdDTEs3QQynDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR03MB3723 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_081140_503212_14E37B23 X-CRM114-Status: GOOD ( 12.48 ) 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,