Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7601581rwr; Wed, 10 May 2023 10:06:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5c8J0eHIA7EErz+XGLIVgRgvINVRYLjGYiKViWYNFEoYCdrI28xJUXdiZsOq5ZnlPiVKMT X-Received: by 2002:a05:6a21:789c:b0:100:607:b986 with SMTP id bf28-20020a056a21789c00b001000607b986mr15889927pzc.56.1683738391596; Wed, 10 May 2023 10:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683738391; cv=none; d=google.com; s=arc-20160816; b=eJFcbLLHpZW6xqFCTPN9PV9UYm2fAbsNVtjFJxrF61YVaMXn2QDDE023T7p1DHUg2B hrjHCKs9DkmED+pbHLxcTDAYOHhfaBzXIFEjbzc1qsCcx+OPwvCmZPaq4pahox8BKEh1 ockr+TmO4WRGR9SbCfC6JOXIa4MBdfV8+OU1rPU89fmOJtrvFEzK8eAGzyNf0iahcf0O 6PAFnSC+KkBCXuQdiiG1AMcel1uzEqu8Mgevk4++XIJ/Zew0A3IemUGFjtREb6/q+ljG waP0TBrdX4d7vxr52maO9FF1f4oamEW7MkKV6V+DvT+FZhTvd5TKS14zpEoR8qNbZDkt z40A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8Gc42bzaewvbzuVY4XS1BAUy3IQI/qYsbZWzsf3GfP0=; b=EmP8y7tbxNISB+m0N6oQfIlsTlWP1HWtZA30yEgV+nxm+ZOkG1P/eXW7R1ru2+hDWg OqVsQxpb0IRwD2sm+dDz+0yNPLhGYPAZ/pI7HxiMcdyd4gLgO6TppqpwrivPRTiDr7qo 3IRLHFadO/+iNE4GSHaclXiWGo5AO24UYJW5SyHtgXdUtbcxlPFuL5U01K7wJr+iAaLZ 6oQaSZRcIUd4tUFkFAPqLeN/PWbf/u/IG1Pkw+CUZAf0NlbI3HSeX/ttJl4W/hnJgibS j2pIysMYM3cD5Az4T6oK2cOZTe+OR8P8NLy9hwKlsS3IiU4XQL8EDw2aL1iQXf3xAo1o wG1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cVqT1ib9; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l197-20020a633ece000000b00517ac1a9a63si4600409pga.129.2023.05.10.10.06.18; Wed, 10 May 2023 10:06:31 -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=@linaro.org header.s=google header.b=cVqT1ib9; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230023AbjEJQ4l (ORCPT + 99 others); Wed, 10 May 2023 12:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjEJQ4k (ORCPT ); Wed, 10 May 2023 12:56:40 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81A04180 for ; Wed, 10 May 2023 09:56:38 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f42d937d61so17509205e9.3 for ; Wed, 10 May 2023 09:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683737797; x=1686329797; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8Gc42bzaewvbzuVY4XS1BAUy3IQI/qYsbZWzsf3GfP0=; b=cVqT1ib9QJ9/kzKSOTrNRKUbrjFXsGdqeYhc+sl3GIaaiQoSSiWjaiKpzzyY7nVDul b7EiokHUG3Gt+0er8OBdwhd9EfIySBdyvkXcbFe07PpYc17OSHvGFkksgsmZpa8sdxre jNADZnOp0yzjwZqfnJrO9mWcPtNlUdF51ebwYeeury3NNZqR8Zp87b8Y9ixIJMPq2TJN 0xdVoNAvjTK59i8wYlIDb2FZoKUII5pTdx5egOrA4n4SQ4I/EcTP189nw1o3FYYGkbwj eaHvBihLqCUKVZBGXFPokDC8Hvrm91tXUoANiG7GRwYINzuFxC0KjDzZ2X063f4rwrjx oEew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683737797; x=1686329797; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8Gc42bzaewvbzuVY4XS1BAUy3IQI/qYsbZWzsf3GfP0=; b=JsBTxgidPsNRu9CUilC2O7eoil8akvuVhI6HypGc7J6UQ5iICl5uQmUsivE2QeEsXI hXvK4t2A8A7VC+nfCyqzDnsOljsnh8ROD2FXwytLGJOq0bm3hR2Rol89fzmkcNUYDu8h P/ee6STGk73zApYOdRchl+OGeN6ZC5dEwg3HM6dFgQ0Xi7M6BIbgnfwLh9sA4//mDBVt RuWkT0dfbYES0UsnfbcPMPRSt+Kxlbno5lKdyEoBrFQQlBJVY+uXZDorDCVsv+9dRIVb QeXq28wyCfMN3PXRBJkXGO/iplGgugOv6A9/3OGTc3dSS66eWHBYqDdxST+iJR6pBYoY tMUQ== X-Gm-Message-State: AC+VfDwfYxDdAMTg1uDZSzUUp+SQR3RIOgYhMEA5yJBnujhAxhHK2yRx 2T6x66yyczAhlDGtKovkBC+VSQ== X-Received: by 2002:adf:ecc4:0:b0:306:2c5b:9da6 with SMTP id s4-20020adfecc4000000b003062c5b9da6mr13711866wro.56.1683737797002; Wed, 10 May 2023 09:56:37 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id o2-20020a5d62c2000000b003062c609115sm17818387wrv.21.2023.05.10.09.56.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 09:56:35 -0700 (PDT) Date: Wed, 10 May 2023 19:56:29 +0300 From: Dan Carpenter To: Yogesh Hegde Cc: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] staging: rtl8192e: Rename tmpRegA and TempCCk Message-ID: <290473de-5946-49d4-9309-6bebf7cc9873@kili.mountain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, May 10, 2023 at 08:39:07PM +0530, Yogesh Hegde wrote: > @@ -680,17 +680,17 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev) > return; > } > > - tmpRegA = rtl92e_get_rf_reg(dev, RF90_PATH_A, 0x12, 0x078); > - if (tmpRegA < 3 || tmpRegA > 13) > + tmp_reg = rtl92e_get_rf_reg(dev, RF90_PATH_A, 0x12, 0x078); > + if (tmp_reg < 3 || tmp_reg > 13) > return; > - if (tmpRegA >= 12) > - tmpRegA = 12; > + if (tmp_reg >= 12) > + tmp_reg = 12; Not related to your patch (which is fine) but this if statement can be deleted. > priv->thermal_meter[0] = ThermalMeterVal; > priv->thermal_meter[1] = ThermalMeterVal; > > - if (priv->thermal_meter[0] >= (u8)tmpRegA) { > + if (priv->thermal_meter[0] >= (u8)tmp_reg) { And casting tmp_reg to u8 is nonsense so that casting can be deleted too. 2 separate patches: patch 1: delete unecessary if statement patch 2: delete unecessary casting regards, dan carpenter