Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1792808imi; Sat, 23 Jul 2022 18:27:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1smIngs8Xf/efDiqMtN/p7lM1fF25Jb2a7ogUg7V/n7blZHVslxrD0zwPOKzFKErTo7EgHA X-Received: by 2002:a05:6402:510c:b0:43a:e041:a371 with SMTP id m12-20020a056402510c00b0043ae041a371mr6322769edd.424.1658626034872; Sat, 23 Jul 2022 18:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658626034; cv=none; d=google.com; s=arc-20160816; b=LVwlyq0ziBXmd663A4yKpBYzBOqH1kIOgCikTdRafsG3U59n6NcnV6e1Sp3p+WtA9S uOJXTWQyRBGgRY6/G7TPjzpqOG4Vyq7KxgEBqnVkhkiohesOCdlqvz7v++6Bjk/5nWP9 gvhjNueMCRbuprjcgD/ljnbBm00pI9zti/UiIBKAVxzRxcEwiQMPLCRuix3Go7yq/US3 jK9T9vV9cCn1Ji0VrP/Hajtc50X5GhFMRpPWWxrqKq5f7Q1Oma4eBaqDSpqSHrbYTVTj O3PygetEP4I/C/ZW+l2plnSBZ2QvYlTnvdgBRAOEu2xV5raq5uHdt2dYBpK/I4DAJ5XK /UeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=sJlC3pZz4yRrqboALzPxN6NrxHOQlQ+UTZ+4eAKFvpo=; b=op8Ka7SWY8r2iD0E+AolFc/xwPYauU0t5Bv3fuqSzOBnnK6s+qc7vVGhpa381On4bd A2JVoRF9vIegIInWm5rgs9QWhSgGDgS1fyAbVaIKp8wjsCh2ilprSNSUNNaT2vxVAbS1 seYLBIq6xgVXbpVP64MklzuQ4/5CA3EckSc3NZwhICR9ZfPdWz6ke66j+Gq3jKuLhudF wr89UGVKjmCl9lXjvuNbrXF/n+NDSMHN4/1YB/WaATcHPtFizRRCGPc0tCM1H77jbRf5 qvghRxl1HDLeGfsA9hV5ps19jreo//Dyi7XFzNz1KVuojhDtLSOxvE0uZ/gN4olifuGg QZIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb11-20020a0564020d0b00b0043bbd4adcddsi12182049edb.496.2022.07.23.18.26.50; Sat, 23 Jul 2022 18:27:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236477AbiGXBWO (ORCPT + 99 others); Sat, 23 Jul 2022 21:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230417AbiGXBWN (ORCPT ); Sat, 23 Jul 2022 21:22:13 -0400 Received: from out28-147.mail.aliyun.com (out28-147.mail.aliyun.com [115.124.28.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D95A217E25; Sat, 23 Jul 2022 18:22:10 -0700 (PDT) X-Alimail-AntiSpam: AC=CONTINUE;BC=0.08158591|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_alarm|0.0251032-0.00206122-0.972836;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047198;MF=zhouyanjie@wanyeetech.com;NM=1;PH=DS;RN=24;RT=24;SR=0;TI=SMTPD_---.Oc.Ojt._1658625725; Received: from 192.168.10.152(mailfrom:zhouyanjie@wanyeetech.com fp:SMTPD_---.Oc.Ojt._1658625725) by smtp.aliyun-inc.com; Sun, 24 Jul 2022 09:22:07 +0800 Subject: Re: [PATCH 3/3] SPI: Ingenic: Add SFC support for Ingenic SoCs. To: Christophe JAILLET , tudor.ambarus@microchip.com, p.yadav@ti.com, michael@walle.cc, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, aidanmacdonald.0x0@gmail.com, tmn505@gmail.com, paul@crapouillou.net, dongsheng.qiu@ingenic.com, aric.pzqi@ingenic.com, rick.tyliu@ingenic.com, jinghui.liu@ingenic.com, sernia.zhou@foxmail.com, reimu@sudomaker.com References: <1658508510-15400-1-git-send-email-zhouyanjie@wanyeetech.com> <1658508510-15400-4-git-send-email-zhouyanjie@wanyeetech.com> From: Zhou Yanjie Message-ID: <9ca88fec-12c5-4fc8-80b7-9a94af3af89f@wanyeetech.com> Date: Sun, 24 Jul 2022 09:22:05 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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 Hi Christophe, On 2022/7/23 下午11:15, Christophe JAILLET wrote: > Le 22/07/2022 à 18:48, 周琰杰 (Zhou Yanjie) a écrit : >> Add SFC support for the X1000 SoC, the X1600 SoC, and the X2000 SoC >> from Ingenic. >> >> Signed-off-by: 周琰杰 (Zhou Yanjie) >> --- >>   drivers/spi/Kconfig           |   9 + >>   drivers/spi/Makefile          |   1 + >>   drivers/spi/spi-ingenic-sfc.c | 662 >> ++++++++++++++++++++++++++++++++++++++++++ >>   3 files changed, 672 insertions(+) >>   create mode 100644 drivers/spi/spi-ingenic-sfc.c >> > > [...] > >> +static int ingenic_sfc_probe(struct platform_device *pdev) >> +{ >> +    struct ingenic_sfc *sfc; >> +    struct spi_controller *ctlr; >> +    int ret; >> + >> +    ctlr = spi_alloc_master(&pdev->dev, sizeof(*sfc)); >> +    if (!ctlr) >> +        return -ENOMEM; > > devm_spi_alloc_master()? (+ error handling simplification) > Or there should be a .remove() function. > Sure, will do in the next version. Thanks and best regards! > CJ > >> + >> +    sfc = spi_controller_get_devdata(ctlr); >> + >> +    sfc->soc_info = of_device_get_match_data(&pdev->dev); >> +    if (!sfc->soc_info) { >> +        dev_err(&pdev->dev, "No of match data provided\n"); >> +        ret = -ENODEV; >> +        goto err_put_master; >> +    } >> + > > [...]