Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2943998pxa; Tue, 18 Aug 2020 02:11:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvH9ekR419V8+gselBumymCHnks9ZV8Vy4ts8ob6iYGuJe1IeKTmsxs32/W9h64JAxPu+O X-Received: by 2002:a17:906:260f:: with SMTP id h15mr18784926ejc.48.1597741862047; Tue, 18 Aug 2020 02:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597741862; cv=none; d=google.com; s=arc-20160816; b=NsNnF9CbR/IOCbqEIhgYoSeRUoQANjX0KEZO8RHfehpnKrfCG8SguHtWE2TWJm9hn9 Tv2OvTAVpRgCOYhm0lpuhHI+3qKOQke+ZWiwOmuIoNebmDqmNhLYNfn2R36tjuf//Zm2 3eOwnMdI+W5/21GuftHZr+A4QG4r7NHB/ZlYV2GAqhMPThaais5HUPp2KYNS5yI02IFm 27sDvABqGMy+bbYFC2MI2pHIuaFOPrruS8GFyWi6i4Arc7NVIXE/b3PpikVnf4wKKfjV uHGLZ901eyJd73aL6Fu9MIpWWOmprAGWqwucFcb1+Z4OFNCCwP3at22HkNaXdjiapNVz dDkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dmarc-filter:dkim-signature; bh=xbw7f7EvWXObjIipWjGcoTIEGzRejBWjPZyzXh3div8=; b=qqwcRzKaonAkxFGl5NBaaslZlIuTIgrNkYIqZnrWkjpPGaJdUvC5YtpQTgu015eyfS QZfJcOMnH2SEUlFGel8lsWhnJ/jJJPUpc4hHOXmkDg0RcNxY2D/Rcfwn7I/9N3HSaDte 11nfd4kR/W+sIQteCKMn6B91HbxLg6kxzm3WOA7Hqa7QIZOzzL7juygcgeSs9cVXc90f 8Ez3+arooQARquCQ9Frs+Sy7fOFC2AZ0WpbVGDPxEDYpjr2FEh0/jM8ryy8xgPJ+eOw7 Toczjh8RzuhO3vWY/NnUONM8+5ME2q1TRuIvChXFVPVqAYkBlO9r2e1fPT/PQ9ZkFPol ELzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=azgT+amb; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d24si13248397ejo.567.2020.08.18.02.10.28; Tue, 18 Aug 2020 02:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=azgT+amb; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbgHRJJf (ORCPT + 99 others); Tue, 18 Aug 2020 05:09:35 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:18117 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbgHRJJc (ORCPT ); Tue, 18 Aug 2020 05:09:32 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597741772; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=xbw7f7EvWXObjIipWjGcoTIEGzRejBWjPZyzXh3div8=; b=azgT+amb4etpm1l58XAC/zfmQxnsLQk95jgTF2Tfke+qPTdNofbMj9zKR4R3Tl4V2VO2onQd +90SQvRVtF0qeeJn7lJ0dwKJ4MGB35NfSOqMjFUh0JDGUlSTo9u4aZLciyKfwr0ESDgp5nm9 pYwLo2Bl8oXUZJpEeUqjAAz9amE= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 5f3b9aa0440a07969ad2b825 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 18 Aug 2020 09:08:48 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 62C06C43387; Tue, 18 Aug 2020 09:08:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1C4A3C433CA; Tue, 18 Aug 2020 09:08:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1C4A3C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Tang Bin Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, davem@davemloft.net, ath10k@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ath10k: fix the status check and wrong return References: <20200814144844.1920-1-tangbin@cmss.chinamobile.com> <87y2mdjqkx.fsf@codeaurora.org> Date: Tue, 18 Aug 2020 12:08:42 +0300 In-Reply-To: (Tang Bin's message of "Tue, 18 Aug 2020 09:42:03 +0800") Message-ID: <87lficjp7p.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Tang Bin writes: > =E5=9C=A8 2020/8/17 22:26, Kalle Valo =E5=86=99=E9=81=93: >>> In the function ath10k_ahb_clock_init(), devm_clk_get() doesn't >>> return NULL. Thus use IS_ERR() and PTR_ERR() to validate >>> the returned value instead of IS_ERR_OR_NULL(). >> Why? What's the benefit of this patch? Or what harm does >> IS_ERR_OR_NULL() create? > > Thanks for you reply, the benefit of this patch is simplify the code, > because in > > this function, I don't think the situation of 'devm_clk_get() return > NULL' exists. > > So please think about it, thanks. I think you missed my comment below: >> devm_clk_get() can return NULL if CONFIG_HAVE_CLK is disabled: >> >> static inline struct clk *devm_clk_get(struct device *dev, const char *i= d) >> { >> return NULL; >> } So I think this patch just creates a new bug and does not improve anything. --=20 https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc= hes