Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp133024pxb; Tue, 9 Mar 2021 18:27:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8RSMMIWSb//vFBfG6B2h4GiULB3CvPBRXwiEpBCQJE/yOsRQVZULAP73M2D6Fas+LsIG6 X-Received: by 2002:a17:906:c08f:: with SMTP id f15mr1101410ejz.318.1615343278812; Tue, 09 Mar 2021 18:27:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615343278; cv=none; d=google.com; s=arc-20160816; b=l67Me3pxsk6y/+Ff4UCGsLNvDlR+upvLZLosZ4LSjh7+ZvOZ9ikk9S2KiZsjCh7QTz YSYlkewNtPG3yCe6IRVC28dLFxNdnPjzrPQvQWaW54rZCZnNYErHPe1lKYAMg+8NHJy+ nKlplnfd/UEKDkRzEIMBBTWCDuUGCgjk1T2ULQUcGH56+djwR6z95nQNvM9b6gjsZNb7 ThKOOYz+c9Lvbsy/0mSkhVMhgXtX5oOLWihfph//7+mG2iuE5u6zL+J6Em0U/j12D4j/ 5ANlpUGpWSum2n+28h957jcGXuo4ujXoQSTV5cMwiwJfVyEzOiIw+ihH0nVl/kfFq5mU g++Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=jC1ofrLuJrhsQplZsX4qB+6kPs2o7MPZrvZdCvpxJ10=; b=KqLXpEmmk3yU+jCw6dK8XRAQNyEKL7+1s9FWk1CR4dLg0HO/n0dHIqv987NZD5WWvN AzoR1hreNqhCnLnsyDq22ukLbTeaIUlwFgSsO3adGI3PwhcllsNRwYbWae/nv2j86R8r eDr6ROEnHvdAbro0LjTigVSXj2sUYTef59ssaT/agZc2kfTrWvV+HQaE6eOOpsZqHc// nnX7XEPlXnhjz65YIvyMu0FuLmWlLkE79jv64uv881xRn62b8ZfSIbqEsHVF1EYpfIgp 9BhH4jNAIjFRvbZgbPTfdQH6mILopFAGQi8iXHWaDZAe83vSBhHz9NHSZxEM87EbF9cF sDow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si7003294edv.534.2021.03.09.18.27.36; Tue, 09 Mar 2021 18:27:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231923AbhCJC0l (ORCPT + 99 others); Tue, 9 Mar 2021 21:26:41 -0500 Received: from mail.loongson.cn ([114.242.206.163]:47472 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231235AbhCJC0j (ORCPT ); Tue, 9 Mar 2021 21:26:39 -0500 Received: from [10.130.0.65] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxedRRLkhgUpQXAA--.29562S3; Wed, 10 Mar 2021 10:26:25 +0800 (CST) Subject: Re: [PATCH v3 5/7] irqchip/loongson-liointc: irqchip add 2.0 version To: Marc Zyngier References: <20210306023633.9579-1-zhangqing@loongson.cn> <20210306023633.9579-6-zhangqing@loongson.cn> <87wnugy9oe.wl-maz@kernel.org> Cc: Huacai Chen , Jiaxun Yang , Thomas Bogendoerfer , Thomas Gleixner , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, wangming01@loongson.cn From: zhangqing Message-ID: <5c5b2593-b07c-cd20-cd08-1d6542471260@loongson.cn> Date: Wed, 10 Mar 2021 10:26:24 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <87wnugy9oe.wl-maz@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf9AxedRRLkhgUpQXAA--.29562S3 X-Coremail-Antispam: 1UD129KBjvdXoWrtr48Gw4UWF4kZF4xuF47XFb_yoWkKrc_Cr 4qg34UXF15ZryfJrs8Cr4UZF93JF9rKr43JFW0g3WIva40vw4UGrWkurZ3t3yIgFn2grna kryFkay7CrW2qjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbVkFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F 4UJVW0owAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv 7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r 1j6r4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCYjI0SjxkI62AI1cAE 67vIY487MxkIecxEwVAFwVW8JwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJV W8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF 1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6x IIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6rWUJVWrZr1UMIIF 0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2Kf nxnUUI43ZEXa7VUbpwZ7UUUUU== X-CM-SenderInfo: x2kd0wptlqwqxorr0wxvrqhubq/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/09/2021 05:10 PM, Marc Zyngier wrote: > >> + >> +static void __iomem *liointc_get_reg_byname(struct device_node *node, >> + const char *name) >> +{ >> + int index = of_property_match_string(node, "reg-names", name); >> + >> + return of_iomap(node, index); > So if of_property_match_string() returns an error, you feed that error > to of_iomap()? Somehow, I don't think that's a good idea. Hi, Marc Thank you for your suggestion, error handling is missing here, + if (index <0) + return NULL; return of_iomap(node, index); It has been fixed in the fourth version, and I will send V4 soon. > + if (of_device_is_compatible(node, "loongson,liointc-2.0")) { > + base = liointc_get_reg_byname(node, "main"); > + if (!base) { > + err = -ENODEV; > + goto out_free_priv; > + } > + for (i = 0; i < LIOINTC_NUM_CORES; i++) { > + priv->core_isr[i] = > + liointc_get_reg_byname(node, core_reg_names[i]); > Please write assignments on a single line. In addition, write assignments on a single line for (i = 0; i core_isr[i] = liointc_get_reg_byname(node, core_reg_names[i]); It is 92 characters, more than 80 characters... Thanks -Qing > > Thanks, > > M. >