Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3005091lqp; Mon, 25 Mar 2024 16:34:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWn/VTqpuuH3qlmGdAdhMZAaseQl/0QmMOutdGoAkbe/zKEDDqLk3V36+ha5Rbnrma5ZMnSPUMuNW8VO9sHRwdh55uZgTacVgmMhpxkbQ== X-Google-Smtp-Source: AGHT+IFcWcFTtaD3mF7B9GWXQ/kKKHmG9b7EDkfvjNtA4+aO2SwkF6QBpIf/qjPsZ/2rnNvqv5ri X-Received: by 2002:a17:903:186:b0:1dd:7df8:9ed7 with SMTP id z6-20020a170903018600b001dd7df89ed7mr12287160plg.15.1711409675478; Mon, 25 Mar 2024 16:34:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711409675; cv=pass; d=google.com; s=arc-20160816; b=Y6vqMUyGaSkWTIfRLs4GV2nVODl0i8C7lv6zdpNSx78KnN0VS+TmzcviwODRgRUNnx LSv8MDdJwvDOUDDA2uDdPrvJzigA6ng42i7K5j17s+sE03j1k7jVenkxSVM8FPDnWqFg IvMyZil6Syquhxrc7Xl4WYAEnPJikPIM+aDBMkPMmcFYABDyzXwHYVRd7SX6O70V24rL 6rHmzpbjrQ0M0Vru+GQZC6m/i9bqY7Uq6dRUSstdAUIi0eVZcNjnqpG+Y4DssSQDe+rO w/iIYLspXhrue82vhjHZwPdFMPX9h593iqHOW6454fwiGjoHYE2qK8EOdrBXRCufIegA +EmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=XUzCAfoJLugWUWT4d6PA/K0MBrb1Z2R/560wgZiaXHo=; fh=OxKqZzwGDA7cb0IMVR6jHy9PHAac01hGigkxEPgCcAw=; b=hY/6Trr1wp77TZ3zDztargNHBhzv/L4riNIMhurV2JYjCXMAAyHiNeIXwchNJn3pTv 5sF7FeYn6xwmeC+Ne6A5sdH6RfoNMws2iePcDvAK58UwqEt7DTMwz9jcwGsdTaLj0pYw nIy9Uhh8RBdq4gqicDcthhbBlMXuLFZ3zjU/JlOrDEGODDQdlZKirD33JbvqUFIWq7iM Pyf/XQ/QPdf+bFz0DOFqm/jMgmFuy1VKY8fO++GQJ7XLRLkL2XU28O/B56WKMTO1EC9+ i09aq/4Ht8TohH2dgC5jyt1y61MRb+p9VKJOdEgmy+ceh1fSdTdJsNHKv+/ZPGlvo2iG vSTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KmVX4qMD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h8-20020a170902680800b001e0b3e0692bsi4069914plk.377.2024.03.25.16.34.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 16:34:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KmVX4qMD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C95D1BE57D9 for ; Mon, 25 Mar 2024 17:17:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C98A446D9; Mon, 25 Mar 2024 15:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KmVX4qMD" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5831A482F4 for ; Mon, 25 Mar 2024 15:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711382321; cv=none; b=GyqPGEzUtEo2CVlVTWJb2nJD5tFGNuMLpYU40pBOxzfpOneRyZ+Tn6N4n4wqjkyznFwVtaqzHI+biaiT04Sdtfnjc/v3H7XW/APTASobqaj7vgQ79sG2nFZ7u/LURnaaOQrtljRhgPZF+XZHD/qlJ/fe8+XyPKHmBUGMiMHP6s0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711382321; c=relaxed/simple; bh=oReHDUpC6TA5VUbgzAw3E1izvq773nmHZTtGXvqXmKI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=EuxlK6bmTK2ghGfnNCTC5SqsOK2I2GAXizGPFEOdo8tfyqSTDJtOgm42E6USoKO+KLiE/l3G7viqn9ZgQmatddH51l0hFDUKMfqnNLyMpWWaf8MiqcWpGEOkKXdUTKqndQosasbM8sulfFSW+/kqAoNFbfqb4HVtrPWRoNYVy8M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KmVX4qMD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29174C43390; Mon, 25 Mar 2024 15:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711382320; bh=oReHDUpC6TA5VUbgzAw3E1izvq773nmHZTtGXvqXmKI=; h=From:To:Cc:Subject:Date:From; b=KmVX4qMDnHBYxgBmeIO5xIic9jQ0NdGwVOuypfeUDy11xrfFlicxZR9ys/pxIqSh+ tioPOGrxAQjRS88Oy6yedDbknxUINo5+kQvem02VwmzqwRKuB4VWNBDopydwy+BYzw 2/sfVTwSbtf5Cp1CKxW7ZBNHNQqjdyPbsEN+AGSSIFWLgl0cu7X03XXeIbb+HuA2ms zPnfbOa3/6+m7dGQRAQlSDkaFNtWVMo5d+T3tNECSgy6Ufq8wm1wkMMwHXxb1/fjGe myLg+S0ChIEBN3mzF81nfV+pCZtT11WhlkLpkz7VeM37f2dyJuuwKya197nOWEeBQB DFuPlYzjXfDTg== From: Kalle Valo To: nbd@nbd.name, lorenzo.bianconi@redhat.com Cc: linux-wireless@vger.kernel.org Subject: [PATCH v2] wifi: mt76: mt7915: workaround dubious x | !y warning Date: Mon, 25 Mar 2024 17:58:38 +0200 Message-Id: <20240325155838.1558680-1-kvalo@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sparse warns: drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:526:9: warning: dubious: x | !y Workaround it by using the '?' operator. Compile tested only. Signed-off-by: Kalle Valo --- v2: * use parenthesis drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c index 450f4d221184..578013884e43 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c @@ -523,7 +523,8 @@ mt7915_fw_debug_wm_set(void *data, u64 val) /* WM CPU info record control */ mt76_clear(dev, MT_CPU_UTIL_CTRL, BIT(0)); - mt76_wr(dev, MT_DIC_CMD_REG_CMD, BIT(2) | BIT(13) | !dev->fw.debug_wm); + mt76_wr(dev, MT_DIC_CMD_REG_CMD, BIT(2) | BIT(13) | + (dev->fw.debug_wm ? 0 : BIT(0))); mt76_wr(dev, MT_MCU_WM_CIRQ_IRQ_MASK_CLR_ADDR, BIT(5)); mt76_wr(dev, MT_MCU_WM_CIRQ_IRQ_SOFT_ADDR, BIT(5)); -- 2.39.2