Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1972926rwi; Fri, 28 Oct 2022 01:03:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5h6efcErD0i4J5mtNaWLcihTBvB2FL+VapgSJmfjXmSF/JD9R3ef+EKThKUUqN45du/PTM X-Received: by 2002:a17:903:22cb:b0:186:a8ae:d0ff with SMTP id y11-20020a17090322cb00b00186a8aed0ffmr25568420plg.71.1666944225509; Fri, 28 Oct 2022 01:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666944225; cv=none; d=google.com; s=arc-20160816; b=YP0OPGpVGRiWEx3A0RcWaAudn8De4tNkU6ueAVCFMeNUGSmadZhenFglyEUW2U7aFv 1rVKCHLGmL54jyM26A6Kj2/X1Gg9DrrE5wCHZWttae44AKw05pn4bMmvGYXu3xWKJR7k xQ3IOJdhxJXrjMfwFX2y2aFOtYdxJ6XezLBdtv24g1CK31vWotMSkc0S9jY4I7c+Qx4C jA3YJM/7bnpAaGcz2D9YwxyOKcgFJudHKl/bQr7kGc4woA+GyRqmJdC+Z4ylZMo18pPf ae+vQM1nLTjGVK3x5+q7kWcifT6p2KGzxDv9+YZmXO48JpIVumksBPZiwVuS1qWArgbO jhxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KFL9adKihekM8F4k25d98PC2Ll0xHE9L3wfiEmdcsI8=; b=LTd/kWObtG5qTGYzVuD+0vTZSQ62ZjsdVKl7H01zltcSXeY30GUfYbIDVnTChKiH9Y zR3pnBbh/ge1kMXJdorbJEFhkYNluWSfsj/ln2Uvpm5tNlZfOPKJl+JnUHKM9RmMFfo9 odyRDVcF//c68d9YFSm0vp0/F+FR4u8FdfZzH1ytyNxsEdI/85/x/N7ekwqm+o81Pm7e Uy2Xon166pZefx+zKQGm4dc6We33Z9YEmR9nAGXsF9mRQCX8QEC3lAXGpJ2IXsmijKGE oaZQ/0INV1b0PErlW/NioNOUY+rUF5eoZ0jiFmn4ahjIMYjBYHeyzbYU0W2kyQW47nCq +1CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ja4yWZKy; 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 l17-20020a170903121100b0017684491caasi5287060plh.594.2022.10.28.01.03.33; Fri, 28 Oct 2022 01:03:45 -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=ja4yWZKy; 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 S230241AbiJ1HnH (ORCPT + 99 others); Fri, 28 Oct 2022 03:43:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbiJ1HnE (ORCPT ); Fri, 28 Oct 2022 03:43:04 -0400 Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A1DC1BB963 for ; Fri, 28 Oct 2022 00:43:04 -0700 (PDT) Received: by mail-vs1-xe34.google.com with SMTP id q127so4356991vsa.7 for ; Fri, 28 Oct 2022 00:43:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KFL9adKihekM8F4k25d98PC2Ll0xHE9L3wfiEmdcsI8=; b=ja4yWZKyRolktBga8ujdVEg5//IwG7IHFxFwFCKwBbuCsZT82D3fGh8l4z1YaRu2rc FtlLWEr09PyYdtIl/Jk+RlGoSFX7PvvRO8VomL0QYmFiB9/Trv6nuXbLLJgsX1qlWoll 6YIfEplsbqikpMStY8KLTY8hFfouX6VMvRIPpGt4VHcYxEawlZ79ddo4uEJSXtOLOUHV b2sDEJztYSA304XkegQ90g5MbHvhohx3cqIbT8nCl4qR+7qFDw4SJri4Es57Yx9mT8r8 H6KrPjhQOVetwenmhL1Kg486RH7YIYSORaKvMroM3Sfq+2aVDHkNIbeSusOxV1P1oEG8 v3tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KFL9adKihekM8F4k25d98PC2Ll0xHE9L3wfiEmdcsI8=; b=IyJxeQUTHCt/yHfnnpAIqmHIrPP1Zq5ZZ36BPN+k8ErKva/dXLkyIenJbxL8XS9NWA fyhIBGNKwAnw4gdZO4KXvabHW6zxW/o4nzeG3wEqg0b7jrfeu4aG/2J60O7tZJ71o2mi wn+bmyVlr2P8XWWWDUXbDMHQsPS8Psiiv0hpoSHhgH5orQTBa9wFnyHu37DvmTXM/JiH bKFJse+Zg6XI5mAQhwGmoJtUABuJtU0McoTGeyf2k80zQI0f73eLymbBUSmmjupw1C2R egmJjhL8b1oxuc2DiDYPk6b4QWBYfMQmMYk77ZSPuhfQGlITR1dnrPH+GZNjPCn19uXx TpjQ== X-Gm-Message-State: ACrzQf2HwO1jU1eZ248AeDWLam3crxgFVqRUbEDt6/LoIfGjzyNA8mGP uMziTxWTZBcBnJx+cnsBnr23s2ATjUwJZOAqjzg4Cj7jHT6FEb6a X-Received: by 2002:a67:1902:0:b0:3aa:3c4c:72c4 with SMTP id 2-20020a671902000000b003aa3c4c72c4mr8457483vsz.67.1666942983231; Fri, 28 Oct 2022 00:43:03 -0700 (PDT) MIME-Version: 1.0 References: <20221028063711.GA35659@rdm> In-Reply-To: From: jovial umwari Date: Fri, 28 Oct 2022 10:42:52 +0300 Message-ID: Subject: Re: [PATCH] Remove Unnecessary typecast of c90 int constant To: Julia Lawall Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 let me again look in deep into it and see why Thank you for the comment On Fri, 28 Oct 2022 at 10:22, Julia Lawall wrote: > > > > On Fri, 28 Oct 2022, UMWARI JOVIAL wrote: > > > According to Linux kernel coding style. > > > > Reported by checkpatch: > > WARNING: Unnecessary typecast of c90 int constant - '(int)2.412e8' could be '2.412e8' > > WARNING: Unnecessary typecast of c90 int constant - '(int)2.487e8' could be '2.487e8' > > It's not ideal to just include the checkpatch messges verbatim in your log > message. It woudl be better to say what you are doing and why, in > complete sentences ("According to the Linux coding style" is not a > complete sentence). > > I also suspect that the checkpatch message is wrong. Floating point > numbers cannot be used in the kernel, and the case of the constant ensures > that the value will be converted to an integer at compile time. > > julia > > > > > Signed-off-by: UMWARI JOVIAL > > --- > > drivers/staging/rtl8192e/rtllib_softmac_wx.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > index fdf867a5dd7a..4fc4fb25d8d6 100644 > > --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c > > @@ -41,8 +41,8 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a, > > > > /* if setting by freq convert to channel */ > > if (fwrq->e == 1) { > > - if ((fwrq->m >= (int)2.412e8 && > > - fwrq->m <= (int)2.487e8)) { > > + if ((fwrq->m >= 2.412e8 && > > + fwrq->m <= 2.487e8)) { > > int f = fwrq->m / 100000; > > int c = 0; > > > > -- > > 2.25.1 > > > > > >