Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1756316rwd; Mon, 15 May 2023 02:34:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ559SfycafAltwp2BDaLcGPlCsstI5omIZNw1pvIGXfmjWGu81lqODtQrnkaU1n8Rx0EKQS X-Received: by 2002:a17:90a:3b0b:b0:23c:ffbf:859e with SMTP id d11-20020a17090a3b0b00b0023cffbf859emr32846554pjc.35.1684143240643; Mon, 15 May 2023 02:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684143240; cv=none; d=google.com; s=arc-20160816; b=t32XqnsozgBoJly8cr4y9nMApClyzy9Kpi36GMGlgrCqmJmRJSf671oRcWfnvviREK QuLg/XFmzHKPSvrSuD/OuQR8sCqKSz3k5w8b2Apl+E/mj0RrVYivmiVkRDl9HGSMAkD/ hKIcs7kzfRHTY5ZPZgYylDc+Plj6YPxcs+drA9du6P5OWt20+hAmD4q0FYrPsEH+ggG7 wcw3qlwEsEETSskqyjzrF4EC8Z2DDHyBm3xzLyDwFUPpW2dLqxUPjLNCO8SdWH8TKBxt f5Zpk0xlKkyxQPDj8UnjfNVqjwba9QRtJ6w9zT7oxIxWuxWHDARifexapNJfbEDEQbw5 +E0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:date:from; bh=S3lH3QCH+Cn/YonVllQchUKxAY20xfUeFo8CuDfyHas=; b=Hvg9HMoSvPywPARLxIWpPnl4HWJ0pC1tGQL3LnOZUhQpdoTX0rSK3c83dCxlOYvyp8 bSIjQzsikiywwjdJ26kDJwwQJLaQaOttByaFOIRf4MUry/5tmKgwYr65LU4S6OtE8lNC F/FG+Z4BdxXAMKZbyj35ekKGJaqxRjkIONwrHYrHFQRZsogF95PRBvTVnw+SelVMn1C3 HGp760qfkvZQjXvpVMepmtE694XnaahARGcW7jz567yziRyVfHqt9Bv/QNQmC3rc+UVV N3XUbfiBz4eQ3w3ZWMnD84QFAZWrMi8Q2NWdx0qb2xRh7JhVRAUXv+bC3QczH0DH56kA NiSw== 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gc3-20020a17090b310300b0024e33c63ed5si28632699pjb.15.2023.05.15.02.33.48; Mon, 15 May 2023 02:34:00 -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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240013AbjEOJVF (ORCPT + 99 others); Mon, 15 May 2023 05:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239975AbjEOJUe (ORCPT ); Mon, 15 May 2023 05:20:34 -0400 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A5B219BF for ; Mon, 15 May 2023 02:15:59 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id 17121625-f301-11ed-abf4-005056bdd08f; Mon, 15 May 2023 12:15:56 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Mon, 15 May 2023 12:15:52 +0300 To: zhuyinbo Cc: andy.shevchenko@gmail.com, Mark Brown , Rob Herring , Krzysztof Kozlowski , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn Subject: Re: [PATCH v9 2/2] spi: loongson: add bus driver for the loongson spi controller Message-ID: References: <20230426071045.20753-1-zhuyinbo@loongson.cn> <20230426071045.20753-3-zhuyinbo@loongson.cn> <049c871d-c658-24c1-91e6-701098f5fc28@loongson.cn> <16913b76-0256-492a-ec90-d367f2b52cc3@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <16913b76-0256-492a-ec90-d367f2b52cc3@loongson.cn> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, May 15, 2023 at 04:14:00PM +0800, zhuyinbo kirjoitti: > 在 2023/5/11 下午3:18, zhuyinbo 写道: > > 在 2023/5/8 下午11:04, andy.shevchenko@gmail.com 写道: ... > > > > +config SPI_LOONGSON_CORE > > > > +    tristate "Loongson SPI Controller Core Driver Support" > > > > > > Does it need to be visible to the user? > > I try to set it invisible that by removing the SPI_LOONGSON_CORE Kconfig > or removing "tristate "Loongson SPI Controller Core Driver Support" that > will cause spi-core driver doesn't be compiled or compiled fail issue, > so I will still set it visible to the user. Making a symbol selectable only can be achieved by removing the description (near to tristate directive), have you tried that? ... > > > > +    res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > > > +    if (res == NULL) { > > > > > > Why not using devm_platform_ioremap_resource()? > > okay, I will use it. > > > > > > > +        dev_err(dev, "cannot get io resource memory\n"); > > > > +        return -ENOENT; > > > > > >     return dev_err_probe(); > > It seems that there is no need to print memory log when use > devm_platform_ioremap_resource because this function had contained > the this memory log print thus I will return PTR_ERR(reg_base). > > reg_base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(reg_base)) > return PTR_ERR(reg_base); Good catch! Sure, go with this. -- With Best Regards, Andy Shevchenko