Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp111925rwb; Tue, 4 Oct 2022 01:08:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6KtDUOo+7DedmjR2kleK52bO2kKQ9X710zG0YG+mzPBr9OW/nia5iQiAReAmWsKY+YNNng X-Received: by 2002:a17:90b:3e8b:b0:202:c85d:8ffa with SMTP id rj11-20020a17090b3e8b00b00202c85d8ffamr16529945pjb.155.1664870935929; Tue, 04 Oct 2022 01:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664870935; cv=none; d=google.com; s=arc-20160816; b=zHpUP12LJq8T/bFU0oDrrAlEFBjeleXJUYKw/fLa7oO4ssgfiv4hMcYBmjWqdUpAep pkiJt229inP5NVhzoOPAsjYPFPyK7mWIeIKfjNHu2pZ8H8QPTXswmGtqVJsDhr8hB1vd ZIYkJx3YJ3+ACSdkqqg0u5AaUJ2QHbccopChQ6DuI0MavWi44JK4Ef+OtII0tlTSZcru YLER4h1yBxRRJaZ/fs9NXdPvdNqqqsgA/wVzNX6e8GDUsMxSRlCOQcmNxLQadVEOFZhC DX0a8VrZ86EIGD5xykjV0BggRgNL9lnhETY7O1UJQLAREMndF11/cqc3M24EfPKkfigs wvzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:to :content-language:cc:user-agent:mime-version:date:message-id :dkim-signature; bh=Iz+05JIx8EDBuIp8PDaL0iVnsly5uZlJsv7KkkWWwEQ=; b=JRxKbMd15CutU3Dt/oQGHP2L4Yor9N02c7shvrP/lWGMWTqfH6tZPle8OXoaI0ulrt b0Al50YMfyAcrjPk/Ncxjf6lM97IdLO9Hr5WmIs283KK2+kgfhMxhlcKHdYHkpFHFYW8 kVGN/fP8IYpZuhUiNOS26xLdx3cxBQ0m5cZWPukeLdVsQrVwkSV0yruKcxVFlGesLET/ KLelgAcVUGeHgudlClx5IiOX24DMBUre826SPw9jQr1/ZF5R6VOuSrI8mNtKmEN6fN6c Nf1BoLcPZxE9508thPyq/qCtQT57dAHn9UpEGJvmSPaAAHp2az8Fv91MAzhsEEAa9fro owyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=CkBj9peD; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020a170902ce0d00b0016d9877e753si12729745plg.46.2022.10.04.01.08.45; Tue, 04 Oct 2022 01:08:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@collabora.com header.s=mail header.b=CkBj9peD; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229854AbiJDHwt (ORCPT + 60 others); Tue, 4 Oct 2022 03:52:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbiJDHwr (ORCPT ); Tue, 4 Oct 2022 03:52:47 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED412B629; Tue, 4 Oct 2022 00:52:46 -0700 (PDT) Received: from [192.168.10.9] (unknown [39.45.148.204]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id 01F2D6602294; Tue, 4 Oct 2022 08:52:42 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1664869964; bh=R6l9T5BM52dcR1rvtAnSOR0sTeiXruJN2cxHdJAe5ZY=; h=Date:Cc:To:From:Subject:From; b=CkBj9peD5/eQeSHFXfLAg/YLU/jvMp4CukTv+9PnxQpjqFUwXRkWWUMmXzvVma8cb Oa9tRZOjBQGdgRkIkDekKrU4ttcqMxz+C3oInmjV49bq+OJPZht98sLxBFfdi7j+uZ tcizwg1nkwuLyUEd1mzlCAI8LvWZH9Gmq8xZD0Oay/4GPNwcvBY2kMbjyD+uZwRUI3 l9oVdntpezgHbu0iWtGr++TJoY5R7PmjoI0RCR/9ASfOB8PVWkW43des2E+Z9F1w0P k61e+iUcci6hhEo8kLXZg3gfhrLZJd/6iVVgbk6CpRaB9L9gdfS3QOYym/KjlA9Vhd 5iENahn47BRHg== Message-ID: <28270724-1c20-5b28-e5cf-ffe29a85ce4c@collabora.com> Date: Tue, 4 Oct 2022 12:52:38 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Cc: usama.anjum@collabora.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, Collabora Kernel ML , kernel-janitors Content-Language: en-US To: =?UTF-8?Q?Tomislav_Po=c5=beega?= , Daniel Golle , Kalle Valo From: Muhammad Usama Anjum Subject: [Bug report] Probably variable is being overwritten Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-wireless@vger.kernel.org Hi, A bit in rfb0r1 is being cleared and result is stored in rfval. Then the first bit is being set without reusing the rfval. It is probably bug or dead code? The same pattern can be seen repeated below as well. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index cbbb1a4849cf..4857e3818418 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -8844,7 +8844,7 @@ static void rt2800_rxiq_calibration(struct rt2x00_dev *rt2x00dev) for (ch_idx = 0; ch_idx < 2; ch_idx = ch_idx + 1) { if (ch_idx == 0) { rfval = rfb0r1 & (~0x3); - rfval = rfb0r1 | 0x1; + rfval = rfval | 0x1; rt2800_rfcsr_write_bank(rt2x00dev, 0, 1, rfval); rfval = rfb0r2 & (~0x33); rfval = rfb0r2 | 0x11; -- Muhammad Usama Anjum