Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp802825rwp; Thu, 13 Jul 2023 00:55:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFuw/3ZYx+RNcbU/oRNucC/El7IVFFUF0JdQ2IKwbegRmCZiYUPyvhazKDyCJ3fuQerIym X-Received: by 2002:a17:902:b60f:b0:1b8:7e55:7a8c with SMTP id b15-20020a170902b60f00b001b87e557a8cmr373392pls.56.1689234945041; Thu, 13 Jul 2023 00:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689234945; cv=none; d=google.com; s=arc-20160816; b=BUMYzzHGtOlvN94M9HijjxWBfF/ysrVScH5kEc9Iwn+SMmgUb3Rj8uMOKfRk9evHGF oRqe2EE2H+c/mNpUW5A/TuLcqGmGTQdAckHQvPdCvR7JiaM+t5XjlP/NUpsaFyVh956x 97kOy+zXyp7bA7FJucoOB8lA9OD0s0UNssOzZnP901P3pxTuG5MAZf8b+0VlJMjH9h3x 7CEWitrbqsuCFnnyJNLDSZZA/njRYJPMn+iSamU+ipdrE81V3OvlBQT5XVvzx8eOo9Ku PIvvgBOsvRQn07C/hfgVJmbGffTfnCYUtRZkPlcuwioBBl4iak8VYGoIOTYTEMX5m0x2 0uQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=pTxbR6KeeV+FJxSPbnngFcfSxrDlS1AZ/DJwic9okog=; fh=vXZ08GaQ57+HmopgpcAxeUyc2zBRPRxluPvsA8HOWoY=; b=Z8rC4vN2J3QExw6+gKx41183fS7H019yfB8ZxQcyC3d1ROZOxcl+kE6e/xUNVXQRos 5LPdBI7OMssyj6wIuAdS80s/ZtSe++B2/kynCA5XN+ge4VFLAqhjA8/yiDmvcYXo+kjy sx9AQFWuzshEdRrGS5yNVdBMMlOF/h2J3lemWTb4d8epCjrgldMXIU2U2WrV3+6OYHJD UstJn/9MU3HjzCjXRNCluP6eR1f/mR05RGQm2vPvnISyBwdoKSQHMGqysyPZSeqAOg3J axHXmlTDmn0L0NTapP3i2+Ul8LBAtBpk1ty0P+3Ys75lgCYR518TgfuwKs2GMvydk7Fg KLAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a17090301cf00b001b8a5cec6e4si5011042plh.251.2023.07.13.00.55.37; Thu, 13 Jul 2023 00:55:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232830AbjGMHw0 (ORCPT + 60 others); Thu, 13 Jul 2023 03:52:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232812AbjGMHwZ (ORCPT ); Thu, 13 Jul 2023 03:52:25 -0400 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D5A51BEB; Thu, 13 Jul 2023 00:52:23 -0700 (PDT) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-98df3dea907so65484766b.3; Thu, 13 Jul 2023 00:52:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689234742; x=1691826742; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pTxbR6KeeV+FJxSPbnngFcfSxrDlS1AZ/DJwic9okog=; b=anx2Se0UlJ5YKSG8ONeSnJCn5GZ7qPgFuPmnL7O7V4Zh6H2NpGSGHSidEwT+zTRdEN pWDWVzE7fFxXDff5rgw56dLheNNPgtORB+hXsMk1OCydqEgIyA8k1Pf+2Dz35/2OfDx0 +Su0DuNjGfClr8/fzDX3uFKrvbCvb7uy7cKk3H8VkZV3UfIapjJPmIerUOwGL2mGokb/ g2O+opiRqDMGo76HBb+CLPP9s+ID5t9ncjfCLrkjgQVrq+dxCOzDuhlEbiWKGM9o5z3H nprajnZPElGL5kOesDVWHN7iUhurI0qhpoK+PAvqPmHDWaTRKlpV8OCXnTTGQjdRxBYr +hQg== X-Gm-Message-State: ABy/qLbZ3uNirsEA4Py01TvxIAIocgg2dANFJGufsfNPVrtVD+vKiIqj RA4z5XqrnTMYvXwsZGxriPE= X-Received: by 2002:a17:906:739e:b0:977:befe:d888 with SMTP id f30-20020a170906739e00b00977befed888mr863511ejl.13.1689234741590; Thu, 13 Jul 2023 00:52:21 -0700 (PDT) Received: from [192.168.1.58] (185-219-167-24-static.vivo.cz. [185.219.167.24]) by smtp.gmail.com with ESMTPSA id d24-20020a170906175800b009928b4e3b9fsm3606280eje.114.2023.07.13.00.52.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Jul 2023 00:52:21 -0700 (PDT) Message-ID: <7305080b-9626-3cd3-707f-b41296578c49@kernel.org> Date: Thu, 13 Jul 2023 09:52:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3] drivers: wireless: ath5k: remove parameter check in ath5k_debug_init_device(struct ath5k_hw *ah) Content-Language: en-US To: Minjie Du , Nick Kossifidis , Luis Chamberlain , Kalle Valo , "open list:ATHEROS ATH5K WIRELESS DRIVER" , open list Cc: opensource.kernel@vivo.com References: <20230713074632.11204-1-duminjie@vivo.com> From: Jiri Slaby In-Reply-To: <20230713074632.11204-1-duminjie@vivo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The subject should be: wifi: ath5k: remove parameter check in ath5k_debug_init_device() I believe this is documented in SubmittingPatches. On 13. 07. 23, 9:46, Minjie Du wrote: > debugfs_create_file() will return early if phydir is an error > pointer, so an extra error check is not needed. It would be worth noting that the check is actually wrong. > Signed-off-by: Minjie Du > --- > drivers/net/wireless/ath/ath5k/debug.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c > index 4b41160e5..ec130510a 100644 > --- a/drivers/net/wireless/ath/ath5k/debug.c > +++ b/drivers/net/wireless/ath/ath5k/debug.c > @@ -982,8 +982,6 @@ ath5k_debug_init_device(struct ath5k_hw *ah) > ah->debug.level = ath5k_debug; > > phydir = debugfs_create_dir("ath5k", ah->hw->wiphy->debugfsdir); > - if (!phydir) > - return; > > debugfs_create_file("debug", 0600, phydir, ah, &fops_debug); > debugfs_create_file("registers", 0400, phydir, ah, ®isters_fops); -- js suse labs