Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3392911rwb; Sun, 25 Sep 2022 05:49:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ibFWEXnt/Ju4IJuYPc0H9jqvsiGbgEFVRlYYtzO6AfdxqZ1BI8Nb/sRN0WOTFHTrNdCGW X-Received: by 2002:aa7:d451:0:b0:456:e651:bc4d with SMTP id q17-20020aa7d451000000b00456e651bc4dmr8849459edr.143.1664110149497; Sun, 25 Sep 2022 05:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664110149; cv=none; d=google.com; s=arc-20160816; b=jTnqHRc5wdBANEqIpWL3Issdfwy3gqczg/fUItIz6v/mnRg1Ji5+zPw7kfdojhcKQj gNS99QlpxicSV57hCM1w0W0XsXZmdWZataWS4OQS7ILmWFo27S3wIKM2B1OZ8GgI3x+V CtuVKoo+XvlqSmVcp8gHUblJWLne50PADoEfTh/liWdRT3RPvOVAQNfiXkdbc/fiGfC5 yGduUpLTdEuuRSNQv9OHtMJQA3/byKMKo7+aZGCO3Jiq4HPzKmQa4OsOVWbwbHl1HUb1 /17kFThN94fygmWHfsQwhWRrzNwolA8lzBcu9apxB36gsLSEi0hBZLcbwW2Lf6B40FJM Mgtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nYGwdayi4yOss73tdyIULkKdD4+VS6uUpFoYtdrkhY0=; b=cfiHD/oyspgEXH3sV/GDNXCzSDSHs5cUZY472xe64/5WsskMtrHsLsq5yS1MrplWZn DFQkArxtBPO0k16Vz3f1n6bQO9+t6T3HcVqR02XLKFzmC2fT5vPQCnq1Bo4ontYgdeg1 3HXU0VqkDdRVgCTMi0Cc5EsqNtgB5pc6x+M7QeBtAdxCgqGE3jbd/vxa/aVyJojGPnzc q/OCXe/AAzdCjF1ESUCJbxVM1KWNgYUmpv9Bf+X0McZwjxDJr5LzZafscxZv0FEfFeCi aLQHv+1qkRPsydFR3c5ba9NAUX+4iz7IK7jg2vPYIsvogClEDYsSiFJoYh77DNtWqHpU QF6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@valentin-vidic.from.hr header.s=2020 header.b=Kn3lUCAM; 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=REJECT sp=REJECT dis=NONE) header.from=valentin-vidic.from.hr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020aa7df92000000b00445dfc9c0cdsi6091262edy.122.2022.09.25.05.48.40; Sun, 25 Sep 2022 05:49:09 -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=@valentin-vidic.from.hr header.s=2020 header.b=Kn3lUCAM; 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=REJECT sp=REJECT dis=NONE) header.from=valentin-vidic.from.hr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231564AbiIYMYE (ORCPT + 99 others); Sun, 25 Sep 2022 08:24:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbiIYMYC (ORCPT ); Sun, 25 Sep 2022 08:24:02 -0400 Received: from valentin-vidic.from.hr (valentin-vidic.from.hr [IPv6:2001:470:1f0b:3b7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD94031DDD for ; Sun, 25 Sep 2022 05:23:59 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at valentin-vidic.from.hr Received: by valentin-vidic.from.hr (Postfix, from userid 1000) id E8DE127603; Sun, 25 Sep 2022 14:23:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=valentin-vidic.from.hr; s=2020; t=1664108631; bh=2JSYXMSMBEigXqbWYJP6Mn64kLyeNXIfMYpVNDbnc6Y=; h=From:To:Cc:Subject:Date:From; b=Kn3lUCAM4J3Ox8PrcT47nycKh9KVJFmMphXe0RfOd8SLy62KH1nyaKJBe40eSLZjP ucOgWvVOmKOCa7rAmjxATnS1LMNrEDQ+44qwe2+Xj0Wh5ncFLOM8DqOFpWJf+RHOk7 5Yh8p2Pj818uYNPTbbc5OfcAc2iJNLkd4acRpMRzqOMhb1AXN8BctkP9toUkb6lRX5 sQ3rB7lyb7P8jlF9q9b9r3JDXWFwM+YSV8Kqe8i9a0/duEF8KzcX83fASd6U6nocyw xWzx3eCsqdLyhLfIne3qNEAQAtViP/S2GtR07lMN09c0enrbFjGV7gXgSfpm9cNUYb xqzTyVHTquV7Jd1aC3OouBS/X2dTt58ztf2zKt3Ny7UdN7HNGILcUQouaftrA1NoIg vxTlctEzzGz3Iw4sGzDQ4tu235j41WB79nLH+imEHlgdutv1nnkoPetuClAqmnD9FT EowDZDXcsrCPlihukd5diOJ50xNegIb3kog3YqK8ubIMRhcSPqqdmAMxH2fnHP2twP Ok7/AiTpfgiePYzvMsSmtoJr3llqesyKpWu8Peqvav46Cvd+V/ma9coGX3S1oJpYSJ yYd5y34wP17Jy5vfiabdCD+wXbgePelkvcv65QrwuRk3U3FTuCD+pRbbcKkoINiIuJ Nz7Z80oCuqKgC8dAMfstear8= From: Valentin Vidic To: Greg Kroah-Hartman Cc: Philipp Hortmann , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Valentin Vidic Subject: [PATCH v3] staging: rtl8192e: fix CamelCase struct member Date: Sun, 25 Sep 2022 14:23:35 +0200 Message-Id: <20220925122335.2489902-1-vvidic@valentin-vidic.from.hr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 warnings for struct member pFirmware. Signed-off-by: Valentin Vidic --- v2: drop the 'p' prefix from the struct member and always use priv->firmware for access. v3: rebase on staging-testing branch .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 +++--- .../rtl8192e/rtl8192e/r8192E_firmware.c | 25 ++++++++----------- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 8 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 5832ccdb4e50..54f5c7574f8a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -622,19 +622,19 @@ bool rtl92e_start_adapter(struct net_device *dev) rtl92e_writeb(dev, ANAPAR, 0x37); mdelay(500); } - priv->pFirmware->status = FW_STATUS_0_INIT; + priv->firmware->status = FW_STATUS_0_INIT; if (priv->RegRfOff) priv->rtllib->eRFPowerState = eRfOff; ulRegRead = rtl92e_readl(dev, CPU_GEN); - if (priv->pFirmware->status == FW_STATUS_0_INIT) + if (priv->firmware->status == FW_STATUS_0_INIT) ulRegRead |= CPU_GEN_SYSTEM_RESET; - else if (priv->pFirmware->status == FW_STATUS_5_READY) + else if (priv->firmware->status == FW_STATUS_5_READY) ulRegRead |= CPU_GEN_FIRMWARE_RESET; else netdev_err(dev, "%s(): undefined firmware state: %d.\n", - __func__, priv->pFirmware->status); + __func__, priv->firmware->status); rtl92e_writel(dev, CPU_GEN, ulRegRead); diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c index 789d288d7503..b4b702623bfe 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c @@ -51,32 +51,31 @@ static bool _rtl92e_fw_check_ready(struct net_device *dev, u8 load_fw_status) { struct r8192_priv *priv = rtllib_priv(dev); - struct rt_firmware *pfirmware = priv->pFirmware; bool rt_status = true; switch (load_fw_status) { case FW_INIT_STEP0_BOOT: - pfirmware->status = FW_STATUS_1_MOVE_BOOT_CODE; + priv->firmware->status = FW_STATUS_1_MOVE_BOOT_CODE; break; case FW_INIT_STEP1_MAIN: - pfirmware->status = FW_STATUS_2_MOVE_MAIN_CODE; + priv->firmware->status = FW_STATUS_2_MOVE_MAIN_CODE; rt_status = _rtl92e_fw_boot_cpu(dev); if (rt_status) - pfirmware->status = FW_STATUS_3_TURNON_CPU; + priv->firmware->status = FW_STATUS_3_TURNON_CPU; else netdev_dbg(dev, "_rtl92e_fw_boot_cpu fail!\n"); break; case FW_INIT_STEP2_DATA: - pfirmware->status = FW_STATUS_4_MOVE_DATA_CODE; + priv->firmware->status = FW_STATUS_4_MOVE_DATA_CODE; mdelay(1); rt_status = _rtl92e_wait_for_fw(dev, CPU_GEN_FIRM_RDY, 20); if (rt_status) - pfirmware->status = FW_STATUS_5_READY; + priv->firmware->status = FW_STATUS_5_READY; break; default: rt_status = false; @@ -134,22 +133,20 @@ bool rtl92e_init_fw(struct net_device *dev) enum opt_rst_type rst_opt = OPT_SYSTEM_RESET; enum firmware_init_step starting_state = FW_INIT_STEP0_BOOT; - struct rt_firmware *pfirmware = priv->pFirmware; - netdev_dbg(dev, " PlatformInitFirmware()==>\n"); - if (pfirmware->status == FW_STATUS_0_INIT) { + if (priv->firmware->status == FW_STATUS_0_INIT) { rst_opt = OPT_SYSTEM_RESET; starting_state = FW_INIT_STEP0_BOOT; - } else if (pfirmware->status == FW_STATUS_5_READY) { + } else if (priv->firmware->status == FW_STATUS_5_READY) { rst_opt = OPT_FIRMWARE_RESET; starting_state = FW_INIT_STEP2_DATA; } for (i = starting_state; i <= FW_INIT_STEP2_DATA; i++) { if (rst_opt == OPT_SYSTEM_RESET) { - if (pfirmware->blobs[i].size == 0) { + if (priv->firmware->blobs[i].size == 0) { const char *fw_name[3] = { RTL8192E_BOOT_IMG_FW, RTL8192E_MAIN_IMG_FW, @@ -161,15 +158,15 @@ bool rtl92e_init_fw(struct net_device *dev) pad = 128; if (!_rtl92e_fw_prepare(dev, - &pfirmware->blobs[i], + &priv->firmware->blobs[i], fw_name[i], pad)) goto download_firmware_fail; } } - mapped_file = pfirmware->blobs[i].data; - file_length = pfirmware->blobs[i].size; + mapped_file = priv->firmware->blobs[i].data; + file_length = priv->firmware->blobs[i].size; rt_status = rtl92e_send_cmd_pkt(dev, DESC_PACKET_TYPE_INIT, mapped_file, file_length); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 671fe547639b..94e8f0706ed4 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -907,8 +907,8 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->card_type = PCI; - priv->pFirmware = vzalloc(sizeof(struct rt_firmware)); - if (!priv->pFirmware) + priv->firmware = vzalloc(sizeof(*priv->firmware)); + if (!priv->firmware) netdev_err(dev, "rtl8192e: Unable to allocate space for firmware\n"); @@ -2409,8 +2409,8 @@ static void _rtl92e_pci_disconnect(struct pci_dev *pdev) priv->polling_timer_on = 0; _rtl92e_down(dev, true); rtl92e_dm_deinit(dev); - vfree(priv->pFirmware); - priv->pFirmware = NULL; + vfree(priv->firmware); + priv->firmware = NULL; _rtl92e_free_rx_ring(dev); for (i = 0; i < MAX_TX_QUEUE_COUNT; i++) _rtl92e_free_tx_ring(dev, i); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 093887bcd463..dba789f0c9e6 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -343,7 +343,7 @@ struct r8192_priv { enum acm_method AcmMethod; - struct rt_firmware *pFirmware; + struct rt_firmware *firmware; enum rtl819x_loopback LoopbackMode; struct timer_list watch_dog_timer; -- 2.30.2