Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4253416rwl; Mon, 10 Apr 2023 08:17:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZHYIfiChu/5RvdD6kAV69TIb8fBCFlUCG7NrJdo5ozwu5wyTE6nAfUu2MOfQ+FJLd+WXud X-Received: by 2002:a17:907:7b9c:b0:933:48ce:73a5 with SMTP id ne28-20020a1709077b9c00b0093348ce73a5mr9962056ejc.56.1681139866307; Mon, 10 Apr 2023 08:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681139866; cv=none; d=google.com; s=arc-20160816; b=vnflmZfR6drF5K4P+pZG/ukurGspyvLcfdHMzSSIWT47pv1ZSTsUuPy/V+EWfDIK29 rsoLiUD4ioQVpi6LTrbWjLIsA1rWJDrJcUZpwPbFX270gKj52qw11FEnOCOHgnq8Dmh3 yOBSagTTqJuJmauqXjz4Jv9JP2BoWqMOYzVnxZzPc7tDjowIC+M2UZp5BaRyxS5Zk7hR 9MLPcSrYYw909ppz69SEY/suW3ON9xrYz90IQY78XY6M7GJKMWZX4nc0U2loHcbojlAc gguNvInv4CHExMu5GHCTElbNcR7mvuEsssp39smZPCvoaXj112/1pMOZTitEgmxBwxdH hbzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=6NlJ7GBmt8Ys/+iPESjp1ddgNkDHX3Nwm76F3ykIkUM=; b=PIe0wsIKFcvHgopdRMUKrgyvQ1+1bTfX2a9/29ZFTlJP6Bk1+EzhOfVIziKY8BPhrI tBm0pG22SPc1aAtSlKcU5GmSfAMghGxbwIHKr7L+ccxoAsqOjoDFa5xph56JMnBlu0Me v6l7dcDrzDXsVhJGbHr5vQQQnkLFlqnMzoWc6Nm52hjT1FYjwknEcqVLvJmGlLX0sPMm eJX1Pt49LZOpba3+sIcMIpS3J8WEBbu7QQljcVWhafovoSHWsDmePewA9DZj/Sy5MV8S JR+ox0Iv8S5Ap1Bu1b1ZTGNJXJc6vWNsyIq9vvQEVbv+59g1ZZYXK8b8OMni2H408S+6 vOwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YClIHRIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a170906454200b00947a40e31cbsi7245203ejq.586.2023.04.10.08.17.08; Mon, 10 Apr 2023 08:17:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YClIHRIZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbjDJPI7 (ORCPT + 99 others); Mon, 10 Apr 2023 11:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbjDJPI6 (ORCPT ); Mon, 10 Apr 2023 11:08:58 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC5DA35B7 for ; Mon, 10 Apr 2023 08:08:56 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id l18so4687170wrb.9 for ; Mon, 10 Apr 2023 08:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681139335; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=6NlJ7GBmt8Ys/+iPESjp1ddgNkDHX3Nwm76F3ykIkUM=; b=YClIHRIZ0TD5Ov5V6bc9XA1I0Sw3m0RhXot0Z3mn+U4WDqarxxLIKq4FyeODAChKpW p7FKbqkk7vBc11+xDhbaebRDltxHveOOrsKuakIdMh2Tlbr2rEyv5ABJT4ak6oa5NEU1 eZ3298MonK/UqbhBONtuSwjPh3kspRjYek2x4OTQBgc0D0XoxRNS2xNQ9Ti1FiShQU9L 15Igfr6/Ez5aGM/9Qj6y2WMoJIXWvfclWFJpgOq9ADfuuHCizY1B2KbuNCiNTI3zvWB7 nxskMABplmt/eXhBGtQ4d/R36zN+aj0F+Kz9opV5WI7o7tBqq7yyF+W9dnI+iAkdtDm1 6JzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681139335; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6NlJ7GBmt8Ys/+iPESjp1ddgNkDHX3Nwm76F3ykIkUM=; b=f1Hv6bLcMr7nkpISfaNaVDj2Y535y6CFhM1XbxrIG+bcYjpuygUPOdq3OYkYHrnoEd hWw92mwi9sh4R+mPf73AQBSKMJaT//f11CnjiqbFdlJ49rjhk98UDApT3u8h3N9P/0oI dPe4L4H+cxu+V+Mhb7OIR+WXmPL+lFSC9DXAZ7LU4z1WzFO38FINdo8Se90dX2RL6FZF T7TA0rvBNj6Q0TpZBu8eV+T4k16i9DSVEzHKzbRuINIJfK20H2l891xbX8XHTUyRh+ZO 4/odi8iKGitysDYC1C2IohnbWGbeu3nQQLGheQhQq7gNfcCtsaRt3Lguk2R1zRTqWzPo 3OcA== X-Gm-Message-State: AAQBX9cQJauQxzd1Mt8v9UspZoiEdm/xnuPhuzaIk7Z9zJnEq7OuNvwK 4N4DuPB/c6C6nd833DDqvA== X-Received: by 2002:a5d:468f:0:b0:2ef:eb73:2c2c with SMTP id u15-20020a5d468f000000b002efeb732c2cmr4569721wrq.10.1681139335027; Mon, 10 Apr 2023 08:08:55 -0700 (PDT) Received: from koolguy (dslb-002-205-192-117.002.205.pools.vodafone-ip.de. [2.205.192.117]) by smtp.gmail.com with ESMTPSA id e8-20020a5d5308000000b002ce9f0e4a8fsm12064465wrv.84.2023.04.10.08.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 08:08:54 -0700 (PDT) Date: Mon, 10 Apr 2023 17:08:52 +0200 From: Dalvin-Ehinoma Noah Aiguobas To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: octeon: remove typedef declaration for enums in octeon-stubs Message-ID: <20230410150852.GA57989@koolguy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix checkpatch.pl warning for enums in drivers/staging/octeon/octeon-stubs.h: cvmx_helper_interface_mode_t, cvmx_spi_mode_t, cvmx_pow_wait_t, cvmx_pko_lock_t, cvmx_pko_status_t Change typedef cvmx_helper_interface_mode_t to enum cvmx_helper_interface_mode in ethernet.c Signed-off-by: Dalvin-Ehinoma Noah Aiguobas --- drivers/staging/octeon/ethernet.c | 2 +- drivers/staging/octeon/octeon-stubs.h | 39 +++++++++++++-------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 9eee28f2940c..023b107e077a 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -798,7 +798,7 @@ static int cvm_oct_probe(struct platform_device *pdev) num_interfaces = cvmx_helper_get_number_of_interfaces(); for (interface = 0; interface < num_interfaces; interface++) { - cvmx_helper_interface_mode_t imode = + enum cvmx_helper_interface_mode imode = cvmx_helper_interface_get_mode(interface); int num_ports = cvmx_helper_ports_on_interface(interface); int port; diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h index 3e7b92cd2e35..58708a7f727a 100644 --- a/drivers/staging/octeon/octeon-stubs.h +++ b/drivers/staging/octeon/octeon-stubs.h @@ -213,14 +213,14 @@ enum cvmx_fau_op_size { CVMX_FAU_OP_SIZE_64 = 3 }; -typedef enum { +enum cvmx_spi_mode { CVMX_SPI_MODE_UNKNOWN = 0, CVMX_SPI_MODE_TX_HALFPLEX = 1, CVMX_SPI_MODE_RX_HALFPLEX = 2, CVMX_SPI_MODE_DUPLEX = 3 -} cvmx_spi_mode_t; +}; -typedef enum { +enum cvmx_helper_interface_mode { CVMX_HELPER_INTERFACE_MODE_DISABLED, CVMX_HELPER_INTERFACE_MODE_RGMII, CVMX_HELPER_INTERFACE_MODE_GMII, @@ -231,20 +231,20 @@ typedef enum { CVMX_HELPER_INTERFACE_MODE_PICMG, CVMX_HELPER_INTERFACE_MODE_NPI, CVMX_HELPER_INTERFACE_MODE_LOOP, -} cvmx_helper_interface_mode_t; +}; -typedef enum { +enum cvmx_pow_wait { CVMX_POW_WAIT = 1, CVMX_POW_NO_WAIT = 0, -} cvmx_pow_wait_t; +}; -typedef enum { +enum cvmx_pko_lock { CVMX_PKO_LOCK_NONE = 0, CVMX_PKO_LOCK_ATOMIC_TAG = 1, CVMX_PKO_LOCK_CMD_QUEUE = 2, -} cvmx_pko_lock_t; +}; -typedef enum { +enum cvmx_pko_status { CVMX_PKO_SUCCESS, CVMX_PKO_INVALID_PORT, CVMX_PKO_INVALID_QUEUE, @@ -252,7 +252,7 @@ typedef enum { CVMX_PKO_NO_MEMORY, CVMX_PKO_PORT_ALREADY_SETUP, CVMX_PKO_CMD_QUEUE_INIT_ERROR -} cvmx_pko_status_t; +}; enum cvmx_pow_tag_type { CVMX_POW_TAG_TYPE_ORDERED = 0L, @@ -1265,8 +1265,7 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear, cvmx_pko_port_status_t *status) { } -static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int - interface) +static inline enum cvmx_helper_interface_mode cvmx_helper_interface_get_mode(int interface) { return 0; } @@ -1342,11 +1341,11 @@ static inline unsigned int cvmx_get_core_num(void) } static inline void cvmx_pow_work_request_async_nocheck(int scr_addr, - cvmx_pow_wait_t wait) + enum cvmx_pow_wait wait) { } static inline void cvmx_pow_work_request_async(int scr_addr, - cvmx_pow_wait_t wait) + enum cvmx_pow_wait wait) { } static inline struct cvmx_wqe *cvmx_pow_work_response_async(int scr_addr) @@ -1356,13 +1355,13 @@ static inline struct cvmx_wqe *cvmx_pow_work_response_async(int scr_addr) return wqe; } -static inline struct cvmx_wqe *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait) +static inline struct cvmx_wqe *cvmx_pow_work_request_sync(enum cvmx_pow_wait wait) { return (void *)(unsigned long)wait; } static inline int cvmx_spi_restart_interface(int interface, - cvmx_spi_mode_t mode, int timeout) + enum cvmx_spi_mode mode, int timeout) { return 0; } @@ -1381,12 +1380,12 @@ static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(int interfac } static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, - cvmx_pko_lock_t use_locking) + enum cvmx_pko_lock use_locking) { } -static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port, - uint64_t queue, union cvmx_pko_command_word0 pko_command, - union cvmx_buf_ptr packet, cvmx_pko_lock_t use_locking) +static inline enum cvmx_pko_status cvmx_pko_send_packet_finish(uint64_t port, + uint64_t queue, union cvmx_pko_command_word0 pko_command, + union cvmx_buf_ptr packet, enum cvmx_pko_lock use_locking) { return 0; } -- 2.25.1