From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BA33C0015E for ; Tue, 1 Aug 2023 10:33:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9114482A; Tue, 1 Aug 2023 12:32:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9114482A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1690885984; bh=scf+PKFAbn0AaWvvUlWuWxZWNZDx+slysWmszaaIKOY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BANOdn61LzeJFfC+bmximlrgwgO8BtJHTF06WliaXcTIubd5NiMD8w+Mb8BHi4dwU I9vPTY9iegZJltxPbPkBY2oz+t092gvWD3DbHMbFd+o0XvpVnmLiIFE7zoYWfaE55h ArdSCQLjx/O0mUjihM7mtZY2zY7p9LXGtN9amCqc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 41275F8053B; Tue, 1 Aug 2023 12:32:14 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C38C1F80087; Tue, 1 Aug 2023 12:32:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DB7EDF801D5; Tue, 1 Aug 2023 12:32:09 +0200 (CEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 022BEF8015B for ; Tue, 1 Aug 2023 12:32:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 022BEF8015B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=JxxdURr/ Received: by mail.gandi.net (Postfix) with ESMTPSA id 6C9FB6000B; Tue, 1 Aug 2023 10:32:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1690885926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=crWIDh8u3C6yGMtEBsqKiRUmuQ9xvfip/08OZw3qp2U=; b=JxxdURr/SHVVPuDRogfmx5lRXOm41IU5riBIedWEmVuiVqPdUjUgVOzQRcA4n+Mqpm/GKZ GxbliO3UUvoreyeNdm3JK8O2QQpHimTInkkjgmimmlJ5XUlMcKE2QY7/fL046n/EPFesxk Kpe+Prgr/5Xj8CWh34jTJwxFnzFBu44/qi/zNcAmbKxZu2nWFo2xPnbTvu5AwwTRU6O5kB 0TIZ5eSZQJiWTjXJfJyuPmvtn+0vzD9VjRdGVGbjfioxvgXogblhab9rMnoKZ0f2NI5/el ZJX7GFdpLoLgqvN1aIyOK7N0mehJJpv5Wh4/sjbs5BeuriC3SCdryRdKPIgyXA== Date: Tue, 1 Aug 2023 12:32:01 +0200 From: Herve Codina To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Linus Walleij , Qiang Zhao , Li Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Christophe Leroy , Randy Dunlap , netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: Re: [PATCH v2 20/28] net: wan: Add framer framework support Message-ID: <20230801123201.25dee219@bootlin.com> In-Reply-To: <84d6431f-bb55-4224-a4a5-45d7036f1e38@lunn.ch> References: <20230726150225.483464-1-herve.codina@bootlin.com> <20230726150225.483464-21-herve.codina@bootlin.com> <84d6431f-bb55-4224-a4a5-45d7036f1e38@lunn.ch> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com Message-ID-Hash: HUPAAWYHTFMMQ6Y4FE6RRVKI7IPMMT3U X-Message-ID-Hash: HUPAAWYHTFMMQ6Y4FE6RRVKI7IPMMT3U X-MailFrom: herve.codina@bootlin.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 1 Aug 2023 11:56:12 +0200 Andrew Lunn wrote: > > +int framer_pm_runtime_get(struct framer *framer) > > +{ > > + int ret; > > + > > + if (!framer) > > + return 0; > > Can framer be a NULL pointer? This sort of test often covers up > bugs. So either let it dereference the NULL pointer and opps, or > return -EINVAL. > Well, in the current usage, it cannot be a NULL pointer. I will simply remove the check (every where it is present) and dereference the pointer instead of returning -EINVAL. Regards, Hervé -- Hervé Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1549DC001E0 for ; Tue, 1 Aug 2023 10:33:07 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=JxxdURr/; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RFWf94Sdgz3bq1 for ; Tue, 1 Aug 2023 20:33:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=JxxdURr/; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=bootlin.com (client-ip=2001:4b98:dc4:8::223; helo=relay3-d.mail.gandi.net; envelope-from=herve.codina@bootlin.com; receiver=lists.ozlabs.org) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4RFWdD3qhkz2yVL for ; Tue, 1 Aug 2023 20:32:15 +1000 (AEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6C9FB6000B; Tue, 1 Aug 2023 10:32:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1690885926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=crWIDh8u3C6yGMtEBsqKiRUmuQ9xvfip/08OZw3qp2U=; b=JxxdURr/SHVVPuDRogfmx5lRXOm41IU5riBIedWEmVuiVqPdUjUgVOzQRcA4n+Mqpm/GKZ GxbliO3UUvoreyeNdm3JK8O2QQpHimTInkkjgmimmlJ5XUlMcKE2QY7/fL046n/EPFesxk Kpe+Prgr/5Xj8CWh34jTJwxFnzFBu44/qi/zNcAmbKxZu2nWFo2xPnbTvu5AwwTRU6O5kB 0TIZ5eSZQJiWTjXJfJyuPmvtn+0vzD9VjRdGVGbjfioxvgXogblhab9rMnoKZ0f2NI5/el ZJX7GFdpLoLgqvN1aIyOK7N0mehJJpv5Wh4/sjbs5BeuriC3SCdryRdKPIgyXA== Date: Tue, 1 Aug 2023 12:32:01 +0200 From: Herve Codina To: Andrew Lunn Subject: Re: [PATCH v2 20/28] net: wan: Add framer framework support Message-ID: <20230801123201.25dee219@bootlin.com> In-Reply-To: <84d6431f-bb55-4224-a4a5-45d7036f1e38@lunn.ch> References: <20230726150225.483464-1-herve.codina@bootlin.com> <20230726150225.483464-21-herve.codina@bootlin.com> <84d6431f-bb55-4224-a4a5-45d7036f1e38@lunn.ch> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Thomas Petazzoni , Xiubo Li , Linus Walleij , Jaroslav Kysela , Eric Dumazet , Krzysztof Kozlowski , Fabio Estevam , Qiang Zhao , Shengjiu Wang , Lee Jones , Jakub Kicinski , Paolo Abeni , devicetree@vger.kernel.org, Conor Dooley , linux-kernel@vger.kernel.org, Nicolin Chen , linux-gpio@vger.kernel.org, Rob Herring , Takashi Iwai , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Randy Dunlap , Liam Girdwood , Li Yang , Mark Brown , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 1 Aug 2023 11:56:12 +0200 Andrew Lunn wrote: > > +int framer_pm_runtime_get(struct framer *framer) > > +{ > > + int ret; > > + > > + if (!framer) > > + return 0; > > Can framer be a NULL pointer? This sort of test often covers up > bugs. So either let it dereference the NULL pointer and opps, or > return -EINVAL. > Well, in the current usage, it cannot be a NULL pointer. I will simply remove the check (every where it is present) and dereference the pointer instead of returning -EINVAL. Regards, Hervé -- Hervé Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9B32C0015E for ; Tue, 1 Aug 2023 10:32:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bE9d4ihoJi3kF8AW0Hzm9tY1D94UsUTyBmNTpd0qH9E=; b=pFs9z2huNS/P5x qcMHXIi079XcUpYxaQL9s6nD526wf28ePHeSGiIZtrPViiZ6lnQslJ3/M6RJ/3c2gt1ExSQIy7jrN HHLcugtzmZxudsZ6cq6aq2qrPelVFGcXjMH7lhBBTmyPRoQKXRoCcpN2FrwqAed3r+F6gjW1DuYN2 +4+3Rou8IZGJgZhlyqWGT15bcyV8xJ3tLtioD9vRHUu0LE3JNNM9MppfrhurdEzADOfL8I9ut58Cq VPwMtO1Qrx7q3Re0b8hJAwbwLqp5VRNCcNmyFm9cJ5WctTVNddhSGW1yKJaGIc8ClyOyAW7fOFcyX I3pLpjjpHyeeKGOPViaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQmfl-001xO0-1i; Tue, 01 Aug 2023 10:32:13 +0000 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQmfi-001xLf-2B for linux-arm-kernel@lists.infradead.org; Tue, 01 Aug 2023 10:32:12 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 6C9FB6000B; Tue, 1 Aug 2023 10:32:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1690885926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=crWIDh8u3C6yGMtEBsqKiRUmuQ9xvfip/08OZw3qp2U=; b=JxxdURr/SHVVPuDRogfmx5lRXOm41IU5riBIedWEmVuiVqPdUjUgVOzQRcA4n+Mqpm/GKZ GxbliO3UUvoreyeNdm3JK8O2QQpHimTInkkjgmimmlJ5XUlMcKE2QY7/fL046n/EPFesxk Kpe+Prgr/5Xj8CWh34jTJwxFnzFBu44/qi/zNcAmbKxZu2nWFo2xPnbTvu5AwwTRU6O5kB 0TIZ5eSZQJiWTjXJfJyuPmvtn+0vzD9VjRdGVGbjfioxvgXogblhab9rMnoKZ0f2NI5/el ZJX7GFdpLoLgqvN1aIyOK7N0mehJJpv5Wh4/sjbs5BeuriC3SCdryRdKPIgyXA== Date: Tue, 1 Aug 2023 12:32:01 +0200 From: Herve Codina To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Linus Walleij , Qiang Zhao , Li Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Christophe Leroy , Randy Dunlap , netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: Re: [PATCH v2 20/28] net: wan: Add framer framework support Message-ID: <20230801123201.25dee219@bootlin.com> In-Reply-To: <84d6431f-bb55-4224-a4a5-45d7036f1e38@lunn.ch> References: <20230726150225.483464-1-herve.codina@bootlin.com> <20230726150225.483464-21-herve.codina@bootlin.com> <84d6431f-bb55-4224-a4a5-45d7036f1e38@lunn.ch> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230801_033210_877789_36101750 X-CRM114-Status: GOOD ( 12.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gVHVlLCAxIEF1ZyAyMDIzIDExOjU2OjEyICswMjAwCkFuZHJldyBMdW5uIDxhbmRyZXdAbHVu bi5jaD4gd3JvdGU6Cgo+ID4gK2ludCBmcmFtZXJfcG1fcnVudGltZV9nZXQoc3RydWN0IGZyYW1l ciAqZnJhbWVyKQo+ID4gK3sKPiA+ICsJaW50IHJldDsKPiA+ICsKPiA+ICsJaWYgKCFmcmFtZXIp Cj4gPiArCQlyZXR1cm4gMDsgIAo+IAo+IENhbiBmcmFtZXIgYmUgYSBOVUxMIHBvaW50ZXI/IFRo aXMgc29ydCBvZiB0ZXN0IG9mdGVuIGNvdmVycyB1cAo+IGJ1Z3MuIFNvIGVpdGhlciBsZXQgaXQg ZGVyZWZlcmVuY2UgdGhlIE5VTEwgcG9pbnRlciBhbmQgb3Bwcywgb3IKPiByZXR1cm4gLUVJTlZB TC4KPiAKCldlbGwsIGluIHRoZSBjdXJyZW50IHVzYWdlLCBpdCBjYW5ub3QgYmUgYSBOVUxMIHBv aW50ZXIuCkkgd2lsbCBzaW1wbHkgcmVtb3ZlIHRoZSBjaGVjayAoZXZlcnkgd2hlcmUgaXQgaXMg cHJlc2VudCkgYW5kCmRlcmVmZXJlbmNlIHRoZSBwb2ludGVyIGluc3RlYWQgb2YgcmV0dXJuaW5n IC1FSU5WQUwuCgpSZWdhcmRzLApIZXJ2w6kKCi0tIApIZXJ2w6kgQ29kaW5hLCBCb290bGluCkVt YmVkZGVkIExpbnV4IGFuZCBLZXJuZWwgZW5naW5lZXJpbmcKaHR0cHM6Ly9ib290bGluLmNvbQoK X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGludXgtYXJt LWtlcm5lbCBtYWlsaW5nIGxpc3QKbGludXgtYXJtLWtlcm5lbEBsaXN0cy5pbmZyYWRlYWQub3Jn Cmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtYXJtLWtl cm5lbAo=