Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp287771lqp; Wed, 12 Jun 2024 01:15:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVq8LVptru2V7FaCH7x0OuUUzr+xgTPcb3XSdLNR4EXo2vEPfVO4hc0JT1iD1ctgci8sJpQpwOJMGGTpEUc5Ia5C7sAF9qPkfXN/XzMNg== X-Google-Smtp-Source: AGHT+IGPiHqqk/Fud+pB6RCzltraeWSlIiwm2JkTTIPvRy+W45VdckvfpSD0djJUSbT2SWI5JWeJ X-Received: by 2002:a05:620a:2942:b0:795:4dc6:df74 with SMTP id af79cd13be357-797f6023dc6mr131084485a.22.1718180154167; Wed, 12 Jun 2024 01:15:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718180154; cv=pass; d=google.com; s=arc-20160816; b=LnAimu+0YfaNStQNGWdYSth/wJl/CsKaI+Ds7hxO65UtNz9j3d6as7oHLXEAyb43F3 hkjM/AB5MIap/Tw7nWw2M1/fbRRPJm8rhvoFxCXmVOoTMnW2DreGLj83O6jFVskPJ/WO 4EOTXTsVAwUo9zk0HgSg5i+SPYfWof8yDu+MBCpyaJViz8xZHzK0BnG4izFGAxeRikko 5WxuFacEX999iSbPO8NVYThMUTm2pfd1DPQAzDe85w8MZjgHC2R8yxHjDSPmvP7nlpvD wDOr6Wys8hTHFUxC43ycAn6Faby5cu2KU1nB8fptv0b7Tql+i1AWJmeBoDaDfnJn0MXI GQtg== 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=xwiyBKJDZarFMbm/078sICFMFxTbzgNIbp48eF3Ki88=; fh=TgNRlKFLBLtq+uoOf409PYAgGvKQePnEo/f6eS7eOjY=; b=Olhudyb1by3sme2iBEfEo0QrpAj9MLrwJBk23YdLp8w5OzDgPqJy/olRO1AY7GiQtt 9Sp0AahW8QvXD5IkQeVr5Ql1QS1BkQNyeY8Thd26DC6n322fPNmFCsAPcm/f30eOb+/9 fdKo1FmpGeerOxgCXtqz+diX8yATOjoBcj+WRBumt09re8UB7PNv1Tdnp6YgMEXIaLG/ 1/06YMtn9Bxf54qhT5wMb9mzCZQ9/4mx6zN0wpLJQkCG6dtRWzf7gZB2sblywf5THfra H9LrvYb5az6GrYgWB8WgW4NYxQygdoVuwGX6mjEgV54zMTkb9D20mxGSbHwXRx6+t4UM 21OQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="VFm/j2lr"; 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-8839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-7954828c8ebsi1154197885a.281.2024.06.12.01.15.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 01:15:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="VFm/j2lr"; 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-8839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8839-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DC1CF1C2382C for ; Wed, 12 Jun 2024 08:15:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12F98168C33; Wed, 12 Jun 2024 08:15:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="VFm/j2lr" 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 472A341C65; Wed, 12 Jun 2024 08:15:42 +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=1718180144; cv=none; b=oJqfM6iPmbfx8PEk1xnT3H0Xuzn0CTICM8I+PNrELg3iYxuV9Zu+akPpgEuGUeOOFAeqWQdHLgOx/PYVzqlU3hLyAIp04ou37ciyR0TdRQU0vKxzTWAAXYzgYr9C6q3prNgVEfRmQ9HCmkxUIouGPNHT4PIALoP0YFHqlL70byA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718180144; c=relaxed/simple; bh=xwiyBKJDZarFMbm/078sICFMFxTbzgNIbp48eF3Ki88=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=QCRh00elHz65/BzN/zKUGUsboAK7xx5jU/F2vvUC5OMJi2vTUY7xyf4qCYQhhcCRWZN8l0sxoAvDFhZrBc8kf/K3YRK4GPp3eSZaf2ksC3dIkM/MyITAe2cStre3s4YwfwmCc1+tirrtNuOk86GSJ9+28egwLnxvKA5R9XGyCzU= 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=VFm/j2lr; 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=xwiyBKJDZarFMbm/078sICFMFxTbzgNIbp48eF3Ki88=; t=1718180142; x=1719389742; b=VFm/j2lrsJ4XrmgwQJdUWDLwvPyz2/utqoYqYw5LGSBW1Dt 9508Gb9wbk1fNqVSjF/rnXnp3Y4suHlfr6wlxw9GkG3KOx5TZFSsPDoouexskCf2hrdfc4zQ0Pu4X +/QmT0Dj9hJJiNznYF3sgr4gdJqkMmtjUh7+3x2d/0nUFqOdsw9BKNUmKh74GXSaZV0IluIDeuPNy XqOp63lidqKIywEQJc35XRBjtg0pVaHlbtB7WuZFGefeYKkuvmh6r7ttlDYjQW3qmD5ujIt2dQLZN 3oztkR45ppyp6a65YgKFigb7OMNbSrxIRtQbgLil1Q1bTwB+FrExXIFqYjEhw/lA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sHJ8o-0000000A301-42zj; Wed, 12 Jun 2024 10:15:35 +0200 Message-ID: <5d901b213389c38eb5bd1df37cb8a1c3d82ebba5.camel@sipsolutions.net> Subject: Re: [PATCH v1 1/2] net: rfkill: Fix a wrongly handling error case 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:15:33 +0200 In-Reply-To: <1717771212-30723-2-git-send-email-quic_zijuhu@quicinc.com> References: <1717771212-30723-1-git-send-email-quic_zijuhu@quicinc.com> <1717771212-30723-2-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 >=20 > use pr_err() instead of WARN() > for this error case handling. I don't see anything wrong with the WARN here, it's the user/driver calling it completely incorrectly. I also don't really think this is a *fix*, if you used the API incorrectly you can't necessarily expect a correct return value, I guess, but anyway it shouldn't happen in the first place. I'm happy to take the return value change (only) as a cleanup, if you wish to resend that. > Fixed by Please also read https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc= hes johannes