Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp288684lqp; Wed, 12 Jun 2024 01:18:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPI40/+YDNiWplbsPZVa0NQDKNYVXGDOI29/3SkyyFD/rlk11lgE+68E2HJonf3s6mfKjQNYqQRWlvlLp7Oc/YUZtTsDVnGZB1YmOYjA== X-Google-Smtp-Source: AGHT+IHxRkJCS6IxTAehq9boHPv8O0yBCNiUboojWEcIOT4go7wKIBIDJznjSrBZJJifva8SfA7J X-Received: by 2002:a05:6a00:1303:b0:704:6ea0:2ba1 with SMTP id d2e1a72fcca58-705bcdeed6cmr1280445b3a.8.1718180307133; Wed, 12 Jun 2024 01:18:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718180307; cv=pass; d=google.com; s=arc-20160816; b=d3mlwR00NueZ/9J1TegwVlcu2bG7rLLrU/ddJ74rmpzdRtUlW1qiR03GhOG6iiLwKh 3rbIJ/hIfG9B2aHBajFWM55Ira4xurtI7ADQAxzV2E9HrQzukEhBysO5od5iQe2A36iL ujB8FMXKOQjhOhEAkE3N2u1/PfX2ryN/CBkSF5gsB8PaD1erUkLEXrMIBjwrRMcFaio1 v9UVBUrVgmTEV46BbFwq8KuHZrE208hnzcxv3rgzhYWeJwq9Q+LoOBqcvp37vgQcxH42 QMKGUOmNbxyy/4Xh9yBhO9ONpXC+bIkq9LtsjvAGQ8tnWd68LPYwdN1b/cp+0Bvvg4CP iFPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=/Ook7rkBngmqtrGjbgaIrN61G62Ik1BkmitSf6tEuuM=; fh=TgNRlKFLBLtq+uoOf409PYAgGvKQePnEo/f6eS7eOjY=; b=O4as7iaefUi+xyNCYLOgRPozmy2hjZP87/Io7qcm3jXwhqJ5Xc5J/DX498umkJyWZG 6x8dR9WCVAjKk9VtsN0MV4n9g2nQ+6TFyHq6hURhK+JrktIx7sG/QikU3/FG9wO4Wya0 ew01y/J1GXxvQ61eMdkHeTp0GS2G6e7G5BMCMUznbFAnKsCfsYlXbLcUOSzISpth0tyG h2fTA3jOA5r4QVNOpK3K2vCsAk9BMKaxS7RoAklhh19NcDNVcjfdJloH4LloSiyckfmd x8RHksXlz/Q6FfsOTO8yYfj8PRSFunRTb36xGXBYeNSblogVFvO34n0a2o72LOMNSgxp pozA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=dyC52WCs; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-8840-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-7041c8bd8bfsi8246786b3a.91.2024.06.12.01.18.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 01:18:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8840-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=dyC52WCs; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-8840-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C287E2870E9 for ; Wed, 12 Jun 2024 08:18:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC05916C84B; Wed, 12 Jun 2024 08:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="dyC52WCs" X-Original-To: linux-wireless@vger.kernel.org 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 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: linux-wireless@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