Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2914346lqo; Tue, 21 May 2024 00:34:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXANS6xsBJdAeLK8rc7IdYX7D6aujbvzeMjOFNW8fXnQi3XwfLTF8t2vq877qjacC4v7lrAyfp5mEHlz0vqat/ScieYUiWHn6Zi5xeKmA== X-Google-Smtp-Source: AGHT+IHDclypXSB+ewBCS+EM9hJ1VSoPxBi0xwUcjxYMCih0N/xI/0AoEzHtQ9SOCgZYMJst0FS5 X-Received: by 2002:a17:90a:3005:b0:2bd:71ed:ca9e with SMTP id 98e67ed59e1d1-2bd71edccc7mr5204038a91.22.1716276871686; Tue, 21 May 2024 00:34:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716276871; cv=pass; d=google.com; s=arc-20160816; b=DHyBHJjRO1CSw6a+EuOWqQEg/BqGUJTXS9jLrYVNQu4Z/w4jzEsBFd1wreddsxbJQ6 Ckt7uSiokWBL6oI1gBLENxQMzd+1EmhYg5+plLmPKx5WvtB3nT3uxeHtunQPs9Lh86Wv qtVxL2Jo+6IrimoYh3fCoNxSEp5f4nMP7Bw6YpFJskzFcIeGLBRhAr8FyIpG6FjEhxBp z+2+C4Krl2DCrSb3h+nLWn/CvZ98pf+RCUL6dTbYvmJqxdx6/D3bYvsS6XnW2lu0Z+NS MU18d8RmDG9432kAo62TIjydObQlDjH0jUuErhj/aNjKMePoRPTL82dKndOR40/qWioN 2VBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=zn+hY6AnEP5z1c/lSffS9Qqf6QfYpj29UvfNSHzxSTE=; fh=VNW6gDUZ5QMLLiSaFLw1IjDFDlz4hdX0RV6cLwIp5do=; b=ki23emT+7aLs/QHzoUAGvtgFpmT1VX09zLNc+SCpueD9oy2xR6o3lMvgcx0NwfJ6GE spic+JBen67GQoxYXW7/M2O2ubwZiVD4vwg1UQvngd20eMILCRMtdBGL9gkz+Z0r7Q9G fh9jrEYOLxe2JsVThrLp+IzcpgxSVRWAQXu8ZqBNdVdhztIOysqk/Y2ux8EidbDWfv9x qdirlwl7OX8/lPykA8/GcRS/J1CE/GDiGULXrNmAMk+BwJqfRh84HICGenlxY9sFgkGz tr89pfAtKH7byaEtTOx0i9tbPDB7f9+1DVRiL07h9xDnwkysOMDWoyUQaJUDyIr/ZimM H0sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=GaPj7+s4; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-184572-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b6715898f9si23897751a91.135.2024.05.21.00.34.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 00:34:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184572-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=GaPj7+s4; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-184572-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2F208281811 for ; Tue, 21 May 2024 07:34:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EF145103C; Tue, 21 May 2024 07:34:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="GaPj7+s4" Received: from mout.web.de (mout.web.de [212.227.15.14]) (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 F1C5D4F88A; Tue, 21 May 2024 07:34:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716276856; cv=none; b=PR5XKMYh+smNqUTJIuZ4N4F7kv4NqWUuQ09n3VeoZIfB0jKEAbg9FAKHcECDnbAtCUBbHz6GuqEiM0QCr/aiXTyi5MnpGGlSIvWwXc79TkNUg8mpGY1to/jOP2kmaiJmKApT/qOql/XtuUcaMD4hbsO64oqzM3Xw4h8tEqusgJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716276856; c=relaxed/simple; bh=cCUHYwHUUcU73ns+lR3zvunoCAM8T5MxFs0Kcv5o/qU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uXAi15IwpRR0lfIyrbPnUfjug9+PTy90LxYKWKMhhr9FEEc1YfKs4Fe/6gOKJLHjQVv6XiACQD4iLbuVzKM30IJQ1e1uPwU1T5T9izmRmUO+cHXys3ob9EMMVm+CkniDnd/ii3RGE/gah1pZFbPUu3lLvGTuh2O6Ekuo4PZWtOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=GaPj7+s4; arc=none smtp.client-ip=212.227.15.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1716276833; x=1716881633; i=markus.elfring@web.de; bh=zn+hY6AnEP5z1c/lSffS9Qqf6QfYpj29UvfNSHzxSTE=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=GaPj7+s4Y4soiqVjtQ9sI9CnLMelXN9004f6A3AlWtjQSY3WXWjtX705DUkEwhiT YkGP42UWqPrBuIXZQ8agTJyuzct0dGcK23qsDfFxYadonVcHfqgCNHKpYXRmmgj7r Z4/wiTG60IqfGfkgaDLhu1W3HXXokF7RcgIVIlK9bcZWc2ajhcZ//e+5N/9aTH40E SxO1X6pOKzt+YbbtOb9nguNcWOgGrCrrekM21TLELzO2jMbDNwOviithS7fshy/VQ Boa7J8zI2XZXfpww2iYlTFJuQM00n43P6PzUOmlIZ+nDKdQ1jAWb7t/sYpa6/17N5 UDih9Fl8blmRVeuI+Q== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.82.95]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N2BMA-1sX3gU3Zxm-013Zxh; Tue, 21 May 2024 09:33:52 +0200 Message-ID: <7ffeb91e-97b7-4f60-851e-120062b63c17@web.de> Date: Tue, 21 May 2024 09:33:51 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 01/13] a2b: add A2B driver core To: =?UTF-8?Q?Alvin_=C5=A0ipraga?= , devicetree@vger.kernel.org, linux-sound@vger.kernel.org, linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: LKML , =?UTF-8?Q?Alvin_=C5=A0ipraga?= , Emil Abildgaard Svendsen , Andi Shyti , Bartosz Golaszewski , Conor Dooley , Greg Kroah-Hartman , Jaroslav Kysela , Krzysztof Kozlowski , Liam Girdwood , Linus Walleij , Mark Brown , Michael Turquette , "Rafael J. Wysocki" , Rob Herring , Saravana Kannan , Stephen Boyd , Takashi Iwai References: <20240517-a2b-v1-1-b8647554c67b@bang-olufsen.dk> Content-Language: en-GB From: Markus Elfring In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:e69jBfqsU7V39J0EAOpZ3TXV931/rCtohLs+eKf1KNp+TNPo7nQ GJHnumpYuZbexnCSr5vp0W59q25zc2+d/sOVIopBIR0W6Q+B8qJo7CmtIpggJLkEkqoUZuQ aBfBvv2vFZkZzSMQDpskzUiKAs+lEiSx3ScFjRTxjWfH6UmADO/T3plH57Tt9yduDMEuNYL tVgMMQiuusWrDzxYSxzTQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:T4sx1G3BKec=;uaEzddfo7N87U07ND12zqMDiS0H SslBAkamtrtzREOt5rDtiUA+8m+GwUYvQJ1Lpe09X0gslOjpIFS3zI5u5+x994mMA2MO1t36O xHjUsLL+vIyH+YuOXISvhWmHdxW+A5GZV7JhqnZNSMYjIu4PSmn5OU+yNXC6OrYRPaBkcEWKp 5XOPYZujcZchs5DVvkO8ce/V7/ogeQ6Na+hnN2V8ArbcY8M1GRxC2SdrvwWa+YRY2uQ+nfUDK Yk7Qep4d5kLRY0LJD75Ssh43aP3tFvvKcgwxqsm3KSLja0L2isHcNVjFEf3iwb7Eq4E6QnXUo 2dEN4XfVtDpH8gtohQh2xqRVyrdq+TXwoHw0vGZOBKRJgBmFPbpaOticmuyW1qLl1Z96ymp07 xNxRLqGU1ka32jDWYNlUXpbQVq52dtNAgZLS3hzOXLU9UFVjRcgBfzEoke7ui1k0FVFomINJI LJOHeQgxCCSlGyVc1oCkenQZx/6EUFZsP0lHAdPerpPxvhloFviSsub1j7lKZburzyKVgZ8ly 9TzFPQ6ueOwX7gU0Bh73XrfFfwMUN3LTfqNcKfuj1mqe+RB+eFEddAUaRnOBjDBbWD5qnhyea T/fjDuEO49tfpTmsEfgOnN13e5cOgR3FNkZ/4Ows0M6PmroK+K0aVw2O6QLg0rc3jM+kz1Cxa Fqs4BE4v2ZxUhgPZzemd1gzclXKcdmT+LgkL6d5v1PnaR7nmIj7u7dFc7qy1209S2V439e7TZ BQRrTQLQDeEEtK/jjXyiWwbDI41vrgk3dU0MHh0NUR2XCsx46jck7P1VSuokOXVEt2W+aK/cu bk1tv4m1DDfrKxGCy5ANcgTKpdMRD/NltPoLsFujTV0A4= >> =E2=80=A6 >>> +++ b/drivers/a2b/a2b.c >>> @@ -0,0 +1,1252 @@ >> =E2=80=A6 >>> +static int a2b_bus_of_add_node(struct a2b_bus *bus, struct device_nod= e *np, >>> + unsigned int addr) >>> +{ >> =E2=80=A6 >>> + node =3D kzalloc(sizeof(*node), GFP_KERNEL); >>> + if (IS_ERR(node)) >>> + return -ENOMEM; >> >> Please improve the distinction for checks according to the handling of = error/null pointers. > > Right, I think it returns NULL on error. Do you see possibilities to reduce =E2=80=9Cconfusion=E2=80=9D about the p= roperties of such a programming interface any further? https://elixir.bootlin.com/linux/v6.9.1/A/ident/kzalloc Regards, Markus