Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp711792rwd; Thu, 25 May 2023 02:52:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Oo8WK+2zTtDHyq4eQXefZpSri7UoiJnXo2urkY3ctUXUzvRHucHWP9ddjE8EWQqBU6hG9 X-Received: by 2002:a17:90a:fc97:b0:255:b1d9:a206 with SMTP id ci23-20020a17090afc9700b00255b1d9a206mr971376pjb.22.1685008327015; Thu, 25 May 2023 02:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685008327; cv=none; d=google.com; s=arc-20160816; b=fXUZAGu/DU6Z9b97XW0R45OmkNQEycnMUp5JMTL7R2nVm+VA+ZbwS4XJTz6l3dapg/ PdkCxP6fvYLvy9hapZYwqJ2IWGbiru6GnOJmCy9ivCiqGiQK1ElwX4gYkhdRMGgMDVU4 dTcuv/Jn0IaWxH4CDaNZaHdGLnR3fSctJy2A81/foxQ7U7lrULRcT5UHSZwOvLHvRmnR pILmN4yic3V2b+CiPwXPQErEKD6FX+5rxjLoX8atZ+J+WRIJCbkUbL6yXg3eycxJm5/P 90fU8rR3EXeNl11iDFF+ObbgGhu8J6r1TnmwsxdeeB7ScXDhjZyWP6z+U6sBv+6SMDkN 0EeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=bkrb9JYxrvKo6/84qG1FmWq0VPVwtVmWqVALBATB5LA=; b=xkV0dINL8iMdv1iDyob/f1lyTeAdueTyT0pVXS1bmYzLU0ejafHIapJNwRsy1UgKBI mAEIl7jS7PGmFJgHmu1qqEGKlOakTx8aj47nhharsskhDgXLvW3ZAPEieFJbMyrSMZKY 4ygsfNfacFY21/kMN6H40x+Gll2W3AQAXSBseSt9KeBQpNqMoJfumo7jjhbvcV7+/qlH 01m3hGEaupmdsIfo9te+/Csd/+aAjMCGpmWYMQAj8aLmqd2oKeEgEx+y3D4UDF2RekmW 8RQ4HAwkWjHoKQ1LqDMMHNwfPRQO7Nou+V9xT93vky0J+6eJJM6YJaeylDXN42/oIjBP F3og== 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 1-20020a17090a000100b002501d633225si2940710pja.11.2023.05.25.02.51.53; Thu, 25 May 2023 02:52:06 -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 S238970AbjEYJ2m (ORCPT + 99 others); Thu, 25 May 2023 05:28:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbjEYJ2l (ORCPT ); Thu, 25 May 2023 05:28:41 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 18026A9; Thu, 25 May 2023 02:28:38 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8BxlPBFKm9ka+4AAA--.2298S3; Thu, 25 May 2023 17:28:37 +0800 (CST) Received: from [10.20.42.35] (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dx97VEKm9kFBJ3AA--.194S3; Thu, 25 May 2023 17:28:37 +0800 (CST) Subject: Re: [PATCH v11 2/2] spi: loongson: add bus driver for the loongson spi controller To: Andy Shevchenko Cc: 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, zhuyinbo@loongson.cn References: <20230522071030.5193-1-zhuyinbo@loongson.cn> <20230522071030.5193-3-zhuyinbo@loongson.cn> <35b0500c-d7fe-6479-eeff-d45bbf9a9426@loongson.cn> <2a72a2c2-6fda-1ea8-3b27-5623cc1132aa@loongson.cn> From: zhuyinbo Message-ID: <889235d3-a5a2-417d-dc47-dbcf543c8549@loongson.cn> Date: Thu, 25 May 2023 17:28:36 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Dx97VEKm9kFBJ3AA--.194S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7GFy8Xw43tryrZrWkurWDtwb_yoW8JF4UpF W3JFWjkr4UKw4kCrWjq3Z8ArnY9F97Jr1Yqr95Gr97Aryqyr9xJr1UtrZF9rZ3CF12kr12 qa1UXFW3CFZ8XrJanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bx8Fc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUXVWUAwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r1I6r4UM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM2 8EF7xvwVC2z280aVCY1x0267AKxVWxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAq jxCEc2xF0cIa020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcV AFwI0_Jrv_JF1lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG 0xvEwIxGrwCYjI0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxAIw28IcVCjz4 8v1sIEY20_WwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I 3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIx AIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAI cVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2js IEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07j8pnQUUUUU= X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,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 在 2023/5/25 下午5:16, Andy Shevchenko 写道: > On Thu, May 25, 2023 at 6:34 AM zhuyinbo wrote: >> 在 2023/5/24 下午4:42, Andy Shevchenko 写道: >>> On Wed, May 24, 2023 at 10:52 AM zhuyinbo wrote: >>>> 在 2023/5/23 下午8:54, andy.shevchenko@gmail.com 写道: >>>>> Mon, May 22, 2023 at 03:10:30PM +0800, Yinbo Zhu kirjoitti: > > ... > >>>>>> + ret = loongson_spi_init_master(dev, reg_base); >>>>>> + if (ret) >>>>>> + return dev_err_probe(dev, ret, "failed to initialize master\n"); >>>>>> + >>>>>> + return ret; >>>>> >>>>> return 0; >>>> >>>> It seems was more appropriate that initialize ret then return ret. >>>> Do you think so ? >>> >>> What do you mean and how does it help here? >> >> I'm sorry, I was wrong before and the ret varible seems not to be >> initialized and it always record the return value for >> loongson_spi_init_master. >> >> It seems was appropriate that use "return ret" and I don't got your >> point that in probe for use "return 0" > > In the above excerpt you will return anything except 0 with return > dev_err_probe(); line. Why do you still need to return ret; at the end > of the function? I'm sorry, I misread it and you are right and I will "return 0". Thanks, Yinbo.