From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 31A6E152500; Wed, 12 Jun 2024 08:18:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718180303; cv=none; b=WSKZSVV5wLomx8HaO6x0jBEc6ZPP9lnK7q6T2vOnrTgc5vEII48UqsF58cDusuAKWxBGCpUsrlu1KDCl+0zhQzcNqSJHIera5KP/e5tIZC6Ibmt2xmYUGAwa3jZzZ4f22k0EjwLqIkLkfqCm5XGJC9G4Ka9m01Pg9kVvW8xPMsk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718180303; c=relaxed/simple; bh=/Ook7rkBngmqtrGjbgaIrN61G62Ik1BkmitSf6tEuuM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=sc7lVoYxQcQhs6Ey/ss3YoBrQG578lqcyaT7PeuGD3TBWFsL/6fEnYu4nIpkLQhN9DkQo21HDjgxdH83nD+TLbnSQ3BLVQDm8PT3w7fhOeTm8X6Qkbl2qb7YQnU+JR3IZ5pj2uAjmJpUtYnPiwv1dvewlEc8szwkosFm/zgV1+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=dyC52WCs; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="dyC52WCs" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=/Ook7rkBngmqtrGjbgaIrN61G62Ik1BkmitSf6tEuuM=; t=1718180302; x=1719389902; b=dyC52WCstwvIAcPUL/G+x3j9Cvqk4kNf2lYoXWuYAje1AIg IyRi4zVNDG3raH36rgi9gGfpMGhsXVBwWDJjEi4szPeM1k8+bGAtDBVRMLlkpP9uD4hbRLvOhFus+ CQeDvwT46Osm8OrRyHMGzER8a16YsLF4tjeBwXDA4QV7Witi9B+SdFfSAxFBTqYVSJXvfiQWTNn5J CQcJh0QVbEMZ3rym0pKLmbo+xZ5/Fkkxl2bQ14rank7yJ2YXhZIfHqzq4+SwBFEY7B4kaAvcEaq8N YNOq64CY3s9sQhZ9YrOyLB9W5BX6RFTVw25scHypndwufgiGryxCbknYxrusdVVA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sHJBP-0000000A3AR-0g75; Wed, 12 Jun 2024 10:18:15 +0200 Message-ID: Subject: Re: [PATCH v1 2/2] net: rfkill: Fix a logic error within rfkill_set_hw_state_reason() From: Johannes Berg To: Zijun Hu , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, emmanuel.grumbach@intel.com Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org Date: Wed, 12 Jun 2024 10:18:13 +0200 In-Reply-To: <1717771212-30723-3-git-send-email-quic_zijuhu@quicinc.com> References: <1717771212-30723-1-git-send-email-quic_zijuhu@quicinc.com> <1717771212-30723-3-git-send-email-quic_zijuhu@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 (3.52.2-1.fc40) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Fri, 2024-06-07 at 22:40 +0800, Zijun Hu wrote: > Kernel API rfkill_set_hw_state_reason() wrongly gets previous block state > by using its parameter @reason as reason mask. Using reason as a mask is perfectly valid. And checking that the bit changed also seems valid. We might want to not schedule the worker if it's not needed, but that's a different issue, I don't see a real bug here? johannes