Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2490282pxp; Mon, 21 Mar 2022 22:22:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdqK4aABVLT/3G2zdVwDYj19jvu+6x18wP/pNj14hj9wFF14WWkCJnsM43lWQ7Bj/5bHVU X-Received: by 2002:a17:902:c9c3:b0:153:b515:a652 with SMTP id q3-20020a170902c9c300b00153b515a652mr16169333pld.87.1647926540757; Mon, 21 Mar 2022 22:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647926540; cv=none; d=google.com; s=arc-20160816; b=XjSc8cAS1Zm8hmHkjiQ0c9OAEhlCYo9fecMz6sqTQxTigvM/Jaugg/C14zuHiYGSp8 QYeiSlXs8qXQR3DBMLGms5N5SGPudG6l7YeOPlDXeKg387oBp2qHE9/N8cDP+9xOjhBI THTJRiOgmm4H41MCDQNLkk+hw6g1Io+1KxLIzR4KjktTWAemgDEBCz0igur9+/e2QRQB AZgrrhaloDAR7TfPzIT7pMLnrrGlOdMGR3TmxhfJo6ausPQXvg+Xaiy/+AGGd9wxZXJA 4BISRX46fwxLfT7f5dQY5cwHet24KXcPO/LloB+vZeRNqQ4rOPal0rD3NqqR92Gtf+Cc +qJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=aHNQ24PWiPjii6F5lkM3fKzrkShIeqqIUDEofSLJIto=; b=CT9o6t7pYfF2FODG/Q8oixtv0kEft3OpinMS6kWxM2GJSjWQ7P5R4e53lm2FdM/aCV TQfFd6H+4HGbNVfFybzRP845RhlIMzHcSi2kYMW/4HdtdI3ewhulnolITSxnR/dbW83I pi7rhxiY/k8BxDFshZWv6vRP8F289hvrZYmsnn0kXWF4GXjDCrxLY4SYFv9/6lTG4wRJ AYmjOHFSGb6vff5fidyXNmXJw7Aup4fhohbduaVFRZ5S5GZCKFlMcgSFELIfh3shuGCH LwTprNKHVtC6QNuIBoiAFLIZFHQZLtNEA2KFMViEroNdaSCugxTSFVWs5UadH4MddUnP TFmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eOPIZw6U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w21-20020a1709027b9500b00153b2d165f9si12365352pll.513.2022.03.21.22.22.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 22:22:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eOPIZw6U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C638D1B7A5; Mon, 21 Mar 2022 21:30:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236427AbiCVEcE (ORCPT + 99 others); Tue, 22 Mar 2022 00:32:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236416AbiCVEcD (ORCPT ); Tue, 22 Mar 2022 00:32:03 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01A3511C16 for ; Mon, 21 Mar 2022 21:30:34 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id bc27so11781291pgb.4 for ; Mon, 21 Mar 2022 21:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=aHNQ24PWiPjii6F5lkM3fKzrkShIeqqIUDEofSLJIto=; b=eOPIZw6UeU1k5ngrdt8Ghoc3fF1MCx8GDFYmjZHl1yJJV/CqC9U56k5j1lYfZ4ugl9 +c3+cfuxLKJDsYidpaWnwLHKP72/0yWOIwU7I+2lkvKltjP2O3zQodOU0XqFmCW/vGg3 Uhg8VElhMz6JWo1Iib2B3Q5H4Cevqb+Df3leDeGpSgGQsj169if5vaJK1RHJRl+CRNzU 9uHiPffOaUgl/BJlnTeosGZ9XPzk99F+wuX4W6hf8NA8Y8PK7aLK6iACMgIqPWcPcQq0 ZSj/fI+8WnwjDKq1esfiBuaLKfH5ipuKupvaIw3ClQ8kv6Ddm9PdrVWrXOsdqMcizAL6 D56g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=aHNQ24PWiPjii6F5lkM3fKzrkShIeqqIUDEofSLJIto=; b=kVNYwwg7zzisbNr85HNU1fXPbc7cebuJWX/fGyD29Z1eiIiwfy6VBuwxkPccOew247 d0cLUe3vzCDct+9RcLvpK/ZGnJhew2NgQfQejxfx0A1TOIDPel3yNxUDenCfmTzsqx3w M9ScQ/pj0HrrpqdPF3mHR5ML3NaLGm+ENIXvqyhhdpnvk3UnhwMBRPaua9vqCoGjWTxl OYqBTqqB4tEWfgk1lddZLujXt3v6aasI7p3e5Xk2k3gniDw7gpCMqvcpxRKnwvjpKp1F uorfo1eWG5fnDID0YBJrvNz4O723xv1Oxg7xHT7qpJurgGKzZgZbNgKI61/9idmPrcEv GCKg== X-Gm-Message-State: AOAM533o0YUDtsYlezar7DCSBwpoWd88xwEK0hQJYNso81tdH0Dp6s4h KADykU7Q4S1NtAaOZoz+SAk= X-Received: by 2002:a62:3896:0:b0:4f7:87dc:de5b with SMTP id f144-20020a623896000000b004f787dcde5bmr27534389pfa.49.1647923434419; Mon, 21 Mar 2022 21:30:34 -0700 (PDT) Received: from [192.168.225.67] ([157.49.254.255]) by smtp.gmail.com with ESMTPSA id h13-20020a056a00170d00b004f757a795fesm21071279pfc.219.2022.03.21.21.30.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Mar 2022 21:30:33 -0700 (PDT) Message-ID: <3a85ae64-00c1-6483-f1d7-c12abdd3ff3a@gmail.com> Date: Tue, 22 Mar 2022 10:00:29 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2] staging: rtl8712: Fix CamelCase warnings Content-Language: en-US To: Greg KH Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20220318101440.13887-1-skumark1902@gmail.com> From: Sathish Kumar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On 18/03/22 4:58 pm, Greg KH wrote: > On Fri, Mar 18, 2022 at 03:44:40PM +0530, Sathish Kumar wrote: >> This patch fixes the checkpatch.pl warnings like: >> CHECK: Avoid CamelCase: >> + u8 blnEnableRxFF0Filter; >> >> Signed-off-by: Sathish Kumar >> --- >> Changes in v2: >> - Remove the "bln" prefix >> --- >> drivers/staging/rtl8712/drv_types.h | 2 +- >> drivers/staging/rtl8712/rtl871x_cmd.c | 2 +- >> drivers/staging/rtl8712/xmit_linux.c | 4 ++-- >> 3 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/staging/rtl8712/drv_types.h b/drivers/staging/rtl8712/drv_types.h >> index a44d04effc8b..4de3aad08242 100644 >> --- a/drivers/staging/rtl8712/drv_types.h >> +++ b/drivers/staging/rtl8712/drv_types.h >> @@ -157,7 +157,7 @@ struct _adapter { >> struct iw_statistics iwstats; >> int pid; /*process id from UI*/ >> struct work_struct wk_filter_rx_ff0; >> - u8 blnEnableRxFF0Filter; >> + u8 enable_rx_ff0_filter; > Shouldn't this be a boolean? > >> spinlock_t lock_rx_ff0_filter; >> const struct firmware *fw; >> struct usb_interface *pusb_intf; >> diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c >> index acda930722b2..69d3c55ee9e5 100644 >> --- a/drivers/staging/rtl8712/rtl871x_cmd.c >> +++ b/drivers/staging/rtl8712/rtl871x_cmd.c >> @@ -202,7 +202,7 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter, >> mod_timer(&pmlmepriv->scan_to_timer, >> jiffies + msecs_to_jiffies(SCANNING_TIMEOUT)); >> padapter->ledpriv.LedControlHandler(padapter, LED_CTL_SITE_SURVEY); >> - padapter->blnEnableRxFF0Filter = 0; >> + padapter->enable_rx_ff0_filter = 0; >> return _SUCCESS; >> } >> >> diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c >> index 90d34cf9d2ff..d58ae5b387d4 100644 >> --- a/drivers/staging/rtl8712/xmit_linux.c >> +++ b/drivers/staging/rtl8712/xmit_linux.c >> @@ -102,11 +102,11 @@ void r8712_SetFilter(struct work_struct *work) >> r8712_write8(adapter, 0x117, newvalue); >> >> spin_lock_irqsave(&adapter->lock_rx_ff0_filter, irqL); >> - adapter->blnEnableRxFF0Filter = 1; >> + adapter->enable_rx_ff0_filter = 1; >> spin_unlock_irqrestore(&adapter->lock_rx_ff0_filter, irqL); >> do { >> msleep(100); >> - } while (adapter->blnEnableRxFF0Filter == 1); >> + } while (adapter->enable_rx_ff0_filter == 1); > Ah, that's funny. It's amazing it works at all and that the compiler > doesn't optimize this away. This isn't a good pattern to use in kernel Do you mean the following code is not a good pattern in kernel? do { msleep(); } while(condition); > code. I know it's not caused by your change here, but perhaps you might > want to fix this up to work properly? > > thanks, > > greg k-h Do i need to replace the above code with some other mechanism? If yes, please let me know which mechanism i should use? Or what should I do here? Note : I am new to Linux kernel development and looking forward to learn and contribute. Thanks, Sathish