Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp127873pxt; Wed, 4 Aug 2021 17:54:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJcRBGCy8J4DGvynhqZBCCcyjaE/y2o/aCBngfDzUhuXNH89przdAea7H8gI5uMxFSWJHC X-Received: by 2002:a92:7d0f:: with SMTP id y15mr423459ilc.10.1628124896002; Wed, 04 Aug 2021 17:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628124895; cv=none; d=google.com; s=arc-20160816; b=V932cH3Wu3HGYT4vOh3Cs9BKqASrMZILd5bny9VehAOOIXNJhCtPtPBqykleBkZu6m ooydWq9IMaNv2cXNherrZK9p2JbOofmuEVGNv0cS+6fFCCrvI8levP6YC+QSREXsbUxK 7ARd0C0mSMAaeQY0n+s5DsDsveLZpvjAgEtIzbmAjGzam4iq0Z7YwZPwC1vhYxKFH5iP hD3Q3QkcPZy6Z+jY8+xyqajTZtagn+e8UAkVElvDyuGIS0xs6tHbK2kQnmHgjwOLnJ+Y rYbmuOBOk8gUBoe29iVShHUTnz2oqqg8LrqYyVcDj4rW0goJS5QaSzKxSoU/kOET8E8E hryQ== 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=z3rdKtAtmpUfyg0lATOCk0JofX75VMc/F9YVDgzTlmo=; b=WeuwD6F3XQ6L8sGRADBgcXaJaIOZk6FvuOSAsayHjJ6ki+O8RFdx3G2rHWFZdk4OBK UeAwi8twtjaz1ciaegWdtp9J8kLpdCDRGQ+x2sucyiN3uIoo44DWrgDgGCd7WiVFXTMu jPQ75WgCkXuPy8lQfvHPcmb9yI3jyrv2fZBNd/AIgVJnz6ucLZcj8+EII7N2YFOdi0jg GVl7V8rLGWBXn+u/iqMsiFlbdnOMZLbvdh6ASu0uvmu+nRu0TZ8IttBUTY1YsuNyNflh KR3o9m35H6a77vejCe2NZrc3SUvWS7XDuPnYhSH2vbCgaxvT/+hry2WA3S/eEpAktDAA 3uSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hL3kh7fJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z41si4600134jah.89.2021.08.04.17.54.44; Wed, 04 Aug 2021 17:54:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hL3kh7fJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240354AbhHDSiX (ORCPT + 99 others); Wed, 4 Aug 2021 14:38:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238601AbhHDSiV (ORCPT ); Wed, 4 Aug 2021 14:38:21 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E760C0613D5 for ; Wed, 4 Aug 2021 11:38:08 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id c24so2779165lfi.11 for ; Wed, 04 Aug 2021 11:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z3rdKtAtmpUfyg0lATOCk0JofX75VMc/F9YVDgzTlmo=; b=hL3kh7fJ702qfHXGRmuNiz3WpbcUAIrGJjPnBX5dl7IcYmyfOdz543UZqWDT9auUXu +VKOuEoya/RW3soo5yomR07LY2DsOXiifZCXUkIY4JBqSOvAdGB29LKMpJPtxEgPSUHR H++B0VlI83gfkmknd9OB6FSzqh5klIS5f4O0o4yySG8tzcz11ZqasKTe2ESGVrsYod1Z xm8x2moPh0FqBv8qLK9+EW15OlH9eSsWWrQsnVQLnXhNgf2SjdRb/Knf6kdg46Wt+QCC mAJLezw1X8dPuqC2g7ftR97cJZOagQQb3QqKIBdHNQkU6GCqg63/eg30usVvtY6OJ2L+ FNZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z3rdKtAtmpUfyg0lATOCk0JofX75VMc/F9YVDgzTlmo=; b=Z6cbP8IkwyE+5/SNtihLeS9rBfsq7vVEc43tRipfR4ewtSdXwjC4mEEGymSj5JqU2N RTndjnaMjv/3agGHah3JzeC4RG3aqcGStxYdk31LYUH3I+380h/sTdF3zmXZw0bRh+Ic CE0CZvzYB7u/OJUqWM0gysUXGEVOV8FxiCPzXDfCcV6mLdQ4o5F9e63yav0sweRk2yYE WcFr/pZD+RJD5mV3iz+7U2G4ZBWwiQPxeCRL82nZKnIFfxdPXU1Z0fasIndEoXHehrpr 7ruG5bJDNqWXw374+c3JKHA9lpSUF3ZyqhJ3hm90y8IASDNHnecKZxSmLELw8zPb5AYZ wGUw== X-Gm-Message-State: AOAM533Jml1foQavLOB8UmfmDUfvbObs5s9/RSGJTwO3pkP983LzOZm1 MOuMS0AD6c8tjGrH8GX++wJBJM4vjvrNAc22ULN93NF4iuGfffTe X-Received: by 2002:a05:6512:2215:: with SMTP id h21mr413449lfu.543.1628102286318; Wed, 04 Aug 2021 11:38:06 -0700 (PDT) MIME-Version: 1.0 References: <20210803223609.1627280-1-nathan@kernel.org> <20210803223609.1627280-4-nathan@kernel.org> In-Reply-To: <20210803223609.1627280-4-nathan@kernel.org> From: Nick Desaulniers Date: Wed, 4 Aug 2021 11:37:55 -0700 Message-ID: Subject: Re: [PATCH 3/4] staging: r8188eu: Remove self assignment in get_rx_power_val_by_reg() To: Nathan Chancellor Cc: Greg Kroah-Hartman , Phillip Potter , Larry Finger , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 3, 2021 at 3:36 PM Nathan Chancellor wrote: > > Clang warns: > > drivers/staging/r8188eu/hal/rtl8188e_rf6052.c:344:13: warning: > explicitly assigning value of variable of type 'u32' (aka 'unsigned > int') to itself [-Wself-assign] > writeVal = writeVal; > ~~~~~~~~ ^ ~~~~~~~~ > 1 warning generated. > > Remove this branch as it is useless. > > Signed-off-by: Nathan Chancellor > --- > drivers/staging/r8188eu/hal/rtl8188e_rf6052.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c b/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c > index 335b120ce603..77889dc05858 100644 > --- a/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c > +++ b/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c > @@ -340,8 +340,6 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel, > /* This mechanism is only applied when Driver-Highpower-Mechanism is OFF. */ > if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_BT1) > writeVal = writeVal - 0x06060606; > - else if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_BT2) > - writeVal = writeVal; Hopefully the author didn't mean to subtract another magic constant like they did above. This also eliminates the last use of TxHighPwrLevel_BT2, but it's probably ok to keep the define in drivers/staging/r8188eu/include/odm.h. Reviewed-by: Nick Desaulniers > *(pOutWriteVal+rf) = writeVal; > } > } > -- > 2.33.0.rc0 -- Thanks, ~Nick Desaulniers