Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3749299rdh; Tue, 28 Nov 2023 02:53:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRZ2xEAuJPkjYm+bgk0i6otT42m2rHQs83xVegIkHKwGxcT2CRzauXdq73+KcNDcCS3fZC X-Received: by 2002:a05:6359:2eaa:b0:16d:e742:a282 with SMTP id rp42-20020a0563592eaa00b0016de742a282mr11727513rwb.17.1701168828711; Tue, 28 Nov 2023 02:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701168828; cv=none; d=google.com; s=arc-20160816; b=oW7apkW5QgESZV8rcjfQFWop+gN+5EJHs0kY1JVXXjyKGRfKwzLC8QT3xIOgEAkudJ pqe7f9Nrd249KAH5xGO3HtVBS76DA/CFRO9rkFm3t2mVGOcboH7LMeRpJVRvdwSKq9dr 2y0ir4UxADOr/C1/BhpFx2wztzqMY0M4ld8ATkTOoOBm6i2R2aElFS5Ly7lheJy8Ft5Z CCFgYMPOi2M0iyb3Zl4YoEHmt/So64Smz4AJruJx1lqQLQ5/+zjqaz81VaFyZtGEa6Xb /3rntnPqvckAwzyBrjiVY7QWwYzK8rINSMH+AhaNc1M5Bh4mKvrVQC5L76D2+C2a7UsV YNQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=deujBW49xIg4FWRLoDbae8+tD+YBI5tyJUGVOFWc1Ks=; fh=XBWE6oWTcDAQV+1zULi9SahUc5jJLLGZaOSpC0eWZDc=; b=ZP7AmJlKn9mhMy7W/h+Jj2ZQccHQeketNXv8IhccVgpIeLueu7Azvn0ImidQ13iHS8 Yb2e/hpMe3pmKirlBgdCln5XAZem+yHeIPwLIgDG2X2n/U4CbcFm6zWaHbsZRqVIUHRS uj2p3+guyzv/tYCqh3viSpmtYcfhwtZy2+7kZ+gvdCshLcqAazAJfl4M+0Og2jbz1Xrm t8+LCT4Ql1FuaX/etEqhXktUQYtS31IX0NJ5ODlkBpH7LFXcoElOlPhrCqvEgNkR1Kod PXMFQlkqj8DVP2TH1y1oQLbhPlHeHgKcVL5H5k6/Q6ljOX6n9r3zK2p8GtX09yoWsUPh KHjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=uQI6Gapi; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=As1Cexsk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bm6-20020a656e86000000b005c1b2baa6a8si13045111pgb.309.2023.11.28.02.53.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 02:53:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=uQI6Gapi; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=As1Cexsk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A359F804B023; Tue, 28 Nov 2023 02:53:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344042AbjK1Kxh (ORCPT + 99 others); Tue, 28 Nov 2023 05:53:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344188AbjK1Kxg (ORCPT ); Tue, 28 Nov 2023 05:53:36 -0500 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A0A3D4B; Tue, 28 Nov 2023 02:53:42 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 303F03200AD4; Tue, 28 Nov 2023 05:53:37 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Tue, 28 Nov 2023 05:53:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1701168816; x=1701255216; bh=de ujBW49xIg4FWRLoDbae8+tD+YBI5tyJUGVOFWc1Ks=; b=uQI6GapiQMe6Hnopgt 8Kiup3r0xYvvDKyg3h3msdwC7QtfVjT7XDt3ddURo2LC79JmY0UZTph10T6qGT14 N1ZjqJBM1jrNf54paVb/bzomh11XPcCGnMnNB9g1VB8ZLQxg6WCbRmpKlYPMrHJf ng8Vtpes1lJrhaOcNKlnR+K7woG3NlD5lkL7IvwPU3/rtAGufpzgzUCCwGJTglSe 4HzBBSS7cSIluloTD9cYleiGsjSgu+5X6srfs+JJx6MRkxi3N8oG1bugQC6vrQKu nisMZAbaQvRPIuu8upJMcqxnPjonshhu5m2mSiTO6V5D9LYyUtKrIhwG3A44aCBJ pC4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701168816; x=1701255216; bh=deujBW49xIg4F WRLoDbae8+tD+YBI5tyJUGVOFWc1Ks=; b=As1CexskTDECzC0Lps503ToibCtw1 ltQ3h0imB92EL2eCy/4DcT+pv4u96loKTX4IWW/m4jBslNtxIpPCLjtyL83P2u0c R2UrSdzgg3eZIZRTS+whhau0y+OlLM2SL29rYe/l2iLAfxmQnq9WdQ7LZqCXQlpg exwn3luBvwWZK94rxquByyto5Nedta52+VVoNMEZTZ8uM7u50K5AAk3QctxyB88l ipbHWuFbw846X4e3LcnbCena6lDhAT/SlcWAcVxiqTNWWmtbpqmY5fHedwE0oQyW VioKwD9wfG7U6HtpJWdgAmDXEWTPgEg61PmGbGva7NCPuKaVCVcfyhfGw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeifedgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 37DA4B60089; Tue, 28 Nov 2023 05:53:35 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1234-gac66594aae-fm-20231122.001-gac66594a MIME-Version: 1.0 Message-Id: In-Reply-To: <23011695aafca595c3c8722fda2a8e194c5318df.camel@pengutronix.de> References: <20231121091101.5540-1-jyanchou@realtek.com> <20231121091101.5540-3-jyanchou@realtek.com> <23011695aafca595c3c8722fda2a8e194c5318df.camel@pengutronix.de> Date: Tue, 28 Nov 2023 11:53:13 +0100 From: "Arnd Bergmann" To: "Philipp Zabel" , "Jyan Chou" , "Ulf Hansson" , "Adrian Hunter" , jh80.chung@samsung.com, riteshh@codeaurora.org, "Rob Herring" , krzysztof.kozlowski+dt@linaro.org Cc: "Conor Dooley" , asutoshd@codeaurora.org, "linux-mmc @ vger . kernel . org" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, "Brian Norris" , "Doug Brown" , "Tony Huang" , "Abel Vesa" , william.qiu@starfivetech.com Subject: Re: [PATCH v7][2/4] mmc: Add Synopsys DesignWare mmc cmdq host driver Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 28 Nov 2023 02:53:47 -0800 (PST) On Mon, Nov 27, 2023, at 13:51, Philipp Zabel wrote: > On Di, 2023-11-21 at 17:10 +0800, Jyan Chou wrote: >> diff --git a/drivers/mmc/host/dw_mmc_cqe.c b/drivers/mmc/host/dw_mmc_cqe.c >> new file mode 100644 >> index 000000000000..eb00d6a474b2 >> --- /dev/null >> +++ b/drivers/mmc/host/dw_mmc_cqe.c >> @@ -0,0 +1,1467 @@ > [...] >> +#ifdef CONFIG_OF >> +static struct dw_mci_board *dw_mci_cqe_parse_dt(struct dw_mci *host) >> +{ >> + struct dw_mci_board *pdata; >> + struct device *dev = host->dev; >> + const struct dw_mci_drv_data *drv_data = host->drv_data; >> + int ret; >> + >> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); >> + if (!pdata) >> + return ERR_PTR(-ENOMEM); >> + > > There is no reason to hide device tree parsing errors here, and I'd > argue pdata should not be returned with rstc set to an error value. > devm_reset_control_get_optional_exclusive() returns NULL if there are > no errors and no reset is specified in the device tree. > > Then you can just use dev_err_probe() at the call site in > dw_mci_cqe_probe(). I think ideally the dw_mci_board should be merged into the dw_mci structure, avoiding the extra kzalloc() step. Having separate structures here is likely an artifact from an old version of the driver that predates the use of devicetree, but since everything now uses DT, there is no point in the extra abstraction. Arnd