Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2203916yba; Mon, 6 May 2019 01:26:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyajeFDJKjQ+/nqd00TRN04Q9xHqH1lVYdjMO/X0dmkmLrsiihP7+fQ5bAHewGyzIcsaFWM X-Received: by 2002:a17:902:6946:: with SMTP id k6mr31090505plt.81.1557131165953; Mon, 06 May 2019 01:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557131165; cv=none; d=google.com; s=arc-20160816; b=0iBHXk91QoNvTyhXLKmoKG05o5R+p+R/BC03rLO3FBAHpbHoJfTWkjmOaxeRbvo2rM I9BQ283nmr6/MkyLwycEzetbL8SC9JxG4PbRoqzolx7Y32OOJ88Sa+Wamxyi0wfkC3rr +QQwJreWkBf+YPo5/V7Yhq4Odihb25zG8mTuyFPFYwA02tV305RVOHC5JvUsLG2LVEB2 PCTwBpg8/gnRi+avlc2Qpzu9MhMhrHpBmXmPdZoD2hxV+KEo4lPdrUvmq0qX9twanaqI pNa4sexwBYNYZQidtBb1GMRZ9758N5tsuz9PiyG/sEvFwDembNugSW2PvZTKzZ9Wk5Xb +MXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=s4EiBzx0kzWcFxNRaSEawR3MhNOrsCK+hxgaq0tYE0A=; b=BwDYWFJ8k/GluJdVl+65vmzr8XM/Ai+0WPOJhvFx1mW0fYYXAAN0KuumldmQZEhmZq jUxeanZhIl54v9lR3JEV6ioaVvHIaqKTvZJON9K7x4g6VRmiEcaMxGLn2ky0QNP4m/5B ux5TOo4mUTG34q5qGo4okNoh13knFCv5yF+iaztlfB8Q3qDHUaOfhzHm1+KU2LVRuo33 bMmyAWHej0X2AAsSa0Yz12+zUngtMoSj6UEcSO7S849+r+KRI677Sq5fs0Ow0pF8SOus +hbFF3WtVZwyBL7+CvIJuEFYpSlEMf7ICeRpmA3NYE9d+XbyNzmXeXZo9EVDFHKfhSI3 fnQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=TPr27RmG; dkim=pass header.i=@codeaurora.org header.s=default header.b=i1KkOMmb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay3si13604306plb.201.2019.05.06.01.25.50; Mon, 06 May 2019 01:26:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=TPr27RmG; dkim=pass header.i=@codeaurora.org header.s=default header.b=i1KkOMmb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726259AbfEFIY5 (ORCPT + 99 others); Mon, 6 May 2019 04:24:57 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37348 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725856AbfEFIY4 (ORCPT ); Mon, 6 May 2019 04:24:56 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0349460E41; Mon, 6 May 2019 08:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557131096; bh=CcStSjrO0gVGsOcZ+KnnAXuOwgsmdjWUfXEyxrzscwE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=TPr27RmGJaEbJjwIbWL28kN1dLHSGJWLGaDb83v4W3h7WTje6INgnb2t1DtGLtTR/ 0X6dlULTaVMEtebKtKowTNasii11czcYJ1yWF85zXXJvF23QAgU9klY3ecTuyifhtO divp09Q5LeTLA9VMXEdd8zke+XpVWy+axtm6vmTI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from x230.qca.qualcomm.com (37-136-65-53.rev.dnainternet.fi [37.136.65.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BA7DF60741; Mon, 6 May 2019 08:24:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557131095; bh=CcStSjrO0gVGsOcZ+KnnAXuOwgsmdjWUfXEyxrzscwE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=i1KkOMmbsX4M0yNhzHTOAjfoTNmSJvMmW5iv3BFydA0Jyaj8ui26Ei/HiGiD3L4II PesZcD4LdQ8dXyyM3SSqcFO1w0Do/MCZIY6E5ENf3Ykp7zXTaarEo9HQkLr2+0+XCA jcr8MQLiAy+EF/TmcBG7xieW/bzFTNnIjizLpubY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BA7DF60741 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Heiner Kallweit Cc: Jia-Ju Bai , ath9k-devel@qca.qualcomm.com, davem@davemloft.net, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: wireless: ath9k: Return an error when ath9k_hw_reset() fails References: <20190504100815.19876-1-baijiaju1990@gmail.com> Date: Mon, 06 May 2019 11:24:51 +0300 In-Reply-To: (Heiner Kallweit's message of "Sat, 4 May 2019 13:02:25 +0200") Message-ID: <87zho0uh0s.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Heiner Kallweit writes: > On 04.05.2019 12:08, Jia-Ju Bai wrote: >> ath9k_hw_reset() in ath9k_start() can fail, and in this case, >> ath9k_start() should return an error instead of executing the >> subsequent code. >> > Such mechanical patches w/o understanding the code are always > problematic. Do you have any proof that this error is fatal? > I think it is not, else we wouldn't have this line: > ah->reset_power_on = false; > Also you should consider that a mutex and a spinlock are held. > Maybe changing the error message to a warning would be more > appropriate. But this I would leave to somebody being more > familiar with this driver. A very good point, thanks Heiner! I will drop this unless someone familiar with ath9k says that this is ok. -- Kalle Valo