Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2718366pxp; Tue, 22 Mar 2022 04:52:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmIUb1wGrZpGPbnVAJpcwb62g2Co0scmlMzcW5zJfy7uzeQ+Dhw2KW0I4nmXzOvPT3G7HW X-Received: by 2002:a17:90b:38c7:b0:1c7:6afb:fac6 with SMTP id nn7-20020a17090b38c700b001c76afbfac6mr1541832pjb.198.1647949954786; Tue, 22 Mar 2022 04:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647949954; cv=none; d=google.com; s=arc-20160816; b=P6ZbE3kthEXSHT9sgrVHqbLrFm7HtbJOzLOUXCBC+9G3+HQrnlTER5DtEd6Opxdxfv n6d6GxeJ6Y7Q5uNLJkt1vQMA8NVc/53q5AwoohzyvgLhSQClx1k9ky3NhTzFQvu2jK7t Ju9FsS4WZvuMVWOx8XsqcMLmTuzr8uExO20EeOgLFwnDCVSnGS1yhzDSGGrnxdk41Arb R60t6C+PloP5uRJ11royAx278gTINoLuXDr3D25B2BdeG/T0eKG10pUfv4/zySzszAZO R4ksGszA1MJRuSKW+WhMSBvHu29KS9ZWLZYp3Wnk0x/js6RVhvbeDiqn5S62nbC3YoHV z7Cw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DFfOJE9o2HqAJOSqBaJFQFfutWgZMKV4kI/WYj73AZY=; b=MZlGRahsMxeDWdh/MFCoUDafDS7eaOPlO+ZaUtC1eX9IVtUpNxQoS1mBNLgvT84pBo dWBW2dnmxCU6GpmwMm/LXt4Pfdn9beZYg8uk9LQt1M+YjOvm+7FDGSUhoHMyum3yV7g0 oT7Gt6mb+npOMdOWP2XhWhRIdtzaavZVZYuVvjauqiONj7NK8JRXJbwq8kuEPgcNSaGm e4f9BIXKzSiBjIXMj7HLgL3skrywNPhLC0juCb1jK34P8qt1RzXklJhnJkFqpxFjsIkE +tiWtqTfgi9zvAngiV8ora/O0imfqMD4LhmaD9b8S6c4c16fHNgl4GNyQnLDCnxk2pnn Z8mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WkdbAVUe; 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 t14-20020a635f0e000000b003816043eefdsi13505162pgb.242.2022.03.22.04.52.17; Tue, 22 Mar 2022 04:52:34 -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=WkdbAVUe; 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 S233258AbiCVKoB (ORCPT + 99 others); Tue, 22 Mar 2022 06:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233267AbiCVKn7 (ORCPT ); Tue, 22 Mar 2022 06:43:59 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B6CD81192 for ; Tue, 22 Mar 2022 03:42:26 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id j13-20020a05600c1c0d00b0038c8f94aac2so1483809wms.3 for ; Tue, 22 Mar 2022 03:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DFfOJE9o2HqAJOSqBaJFQFfutWgZMKV4kI/WYj73AZY=; b=WkdbAVUeg++bdea+vhZthWfIKaO5ibIym7B19DfJlss0ygAzE8WtcxGgk3Rq9sfFed UwgqLMLZKc6Y5I+J0KyeK+hsrns5AZtsO4FdBKxgXLtHgiGpPPS6eYt4h5NuD+eqzrs8 RLLj0Gz4hLS8zETFMySV+vWfhFXY5tlf1zSLiPqTs5B62TnVhn+jFjDyu77AyJ6j/UaZ 5xMfZNuKmut2DhAcvKoRWuqv6jjpfmj9nmbrHqpIc/4/So2tfdOZbdQZNfONwnZPj4hC vIyxAzVxXxI1zAMtF4rg90j5QD4xanY1EHUcO/HsV4bsTH4VQTWmnFs6nz4SUmxImV5Q nsgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DFfOJE9o2HqAJOSqBaJFQFfutWgZMKV4kI/WYj73AZY=; b=CvdLoBRrw8D9n3eyZKHWy3SfFSPS1qrMTQsseHJlzXvkUwiD26kyDfqQ6FP45TVV5K bUuslvjPacR7JueSw2ujnMucYgRyRB7ZFWinVHujPsSK4PyzZZokvk8OOP5js04CfFDd aokwgER6+U0zlhRVcSstV5KrOry56Bt02/feY1+hqHV5LCltd097RwTWdoj9ruRsZQdy VB4+RZbqqdjKLBsArSXz9tkaha9NNN819ArIbTqYjNRN68U6M9/SeqP2NB91lXZiC4sE 0bXpE2gOwZDZ1FtrwViYbI9gVU1BvvEEP7TnLRMgmFjVdxf81QWgp0UQj5Yz7VpZoWaC zdpA== X-Gm-Message-State: AOAM531uxpKszMipvMSf/9ZI+d3d0z8gBV+bo+KxbR65gHN6JYvO1GoE DVsbtyckl/x7OT+5pGlbH2U= X-Received: by 2002:adf:db4b:0:b0:203:e76f:fc45 with SMTP id f11-20020adfdb4b000000b00203e76ffc45mr20818549wrj.549.1647945744429; Tue, 22 Mar 2022 03:42:24 -0700 (PDT) Received: from leap.localnet (host-79-37-100-169.retail.telecomitalia.it. [79.37.100.169]) by smtp.gmail.com with ESMTPSA id c12-20020a05600c0a4c00b00381141f4967sm1903414wmq.35.2022.03.22.03.42.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Mar 2022 03:42:23 -0700 (PDT) From: "Fabio M. De Francesco" To: Greg KH , Sathish Kumar Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: rtl8712: Fix CamelCase warnings Date: Tue, 22 Mar 2022 11:42:21 +0100 Message-ID: <1786742.atdPhlSkOF@leap> In-Reply-To: <3a85ae64-00c1-6483-f1d7-c12abdd3ff3a@gmail.com> References: <20220318101440.13887-1-skumark1902@gmail.com> <3a85ae64-00c1-6483-f1d7-c12abdd3ff3a@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On marted=C3=AC 22 marzo 2022 05:30:29 CET Sathish Kumar wrote: > 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(-) > >> > >> [...] > >> > >> do { > >> msleep(100); > >> - } while (adapter->blnEnableRxFF0Filter =3D=3D 1); > >> + } while (adapter->enable_rx_ff0_filter =3D=3D 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); Exactly, this is not a pattern that works as you expect :) I was waiting for Greg to detail something more about this subject but,=20 since it looks like he has no time yet to respond, I'll try to interpret=20 his words. (@Greg, please forgive me if I saying something different from what you intended to convey :)). The reason why this pattern does not work as expected is too long to be explained here. However, I think that Greg is suggesting to you to research and use what are called "Condition variables". Take some time to research and understand what the Linuc kernel uses for waiting for completion or state changes: struct completion,=20 wait_for_completion(), complete(), and others. Another related mechanism are the Linux kernel "Wait Queues". Do some=20 research and understand how to use wait_event{,_interruptible,timeout}=20 and wake_up{,all,interruptible,interruptible_all}. If I recall correctly you may find one or more of my own patches to r8188eu where I use those API (git-log is your friend). I hope that all the above will be sufficient to start with. Again, Greg please correct my words if I'm misinterpreting what you requested to Sathish. Thanks, =46abio M. De Francesco > > 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 >=20 > Do i need to replace the above code with some other mechanism? >=20 > If yes, please let me know which mechanism i should use? Or what should=20 > I do here? >=20 > Note : I am new to Linux kernel development and looking forward to learn= =20 > and contribute. >=20 > Thanks, > Sathish >=20 >=20