Message ID | 20230811095805.2974722-2-maobibo@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp979981vqi; Fri, 11 Aug 2023 03:12:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4Ehk+LlG3KDvw4QGAHnx9q1IIayUOiFYkIHISerYhXfBNUf9v5tPkNosu8SIavbHlGuxd X-Received: by 2002:aa7:d481:0:b0:523:b665:e48e with SMTP id b1-20020aa7d481000000b00523b665e48emr1549203edr.7.1691748738006; Fri, 11 Aug 2023 03:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691748737; cv=none; d=google.com; s=arc-20160816; b=XGZUEr276MtKojKuCckr4xkaUYFWo+wUnHOs14gr2ysLtStYRQwHzB6omNy0UAAjld UGhE90WN69yZoS91KpIw0BhUI1tgtDKDbdqyw8JJpy0Y45UhqZXJ4iTOsmL9z7Q1PAJv kI0FudWHI6cqREe79ZtewZe8nFzi705jaFBiSOZC01I6jzOrlUB5VG0LHVASTp3ddPdK ezCvJg5Dun3efskKZ9cDMahwTQxO/IIhirhpUT3MznMns8FA75Ona2uLHG1hK9IDSsmz sfv4pCYzjg8eFYsiqHi91aOlWn7HE9p7+V6tvTXFMHcj9ZVJrVfiHf2TPLwxidpKy0Pe ULXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dbI/JmCgH0U7nCu/EjEjy95SdhZVMdGYImGRmRA/Nh0=; fh=Y3+CR8DbvrL4KzdH0gKbA6cLtkHm4Wgbs811/TdZ+7Y=; b=AjXo5/J3Dm03qqoCSna4E3Mr/+HvvWxl1bk1L2aRMrYP9k0oKZiGrWkptjHNc8HZum 9CUAGHpeyBzMyvUNqvW2qwKNKzx79mHMpvB4S1QRcV0tgboJZaXHeWfhw99lT2yxI+46 Nx/T7wVuKJi2a4RjtXAfQ5r/eI17DzblbgJCioqTv487CcPckpdGgizarkUe3/jNf1XC JNGDmptL3CUYzw52CKGe7A6uD8t0dugCs5FPicYUWjgQ9nUWlkRC711MHpwXWcCm5sKJ w5zo0jV4to3UA7VA5+WagLUhFw44VN9XEOt64Endd8FAoeoKRXd2cVAEE/Sd5LK27HIc 6zmw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a056402164a00b005237b4b5082si3065419edx.81.2023.08.11.03.11.51; Fri, 11 Aug 2023 03:12:17 -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 S235295AbjHKJ6S (ORCPT <rfc822;shaohuahua6@gmail.com> + 99 others); Fri, 11 Aug 2023 05:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235244AbjHKJ6O (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Aug 2023 05:58:14 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4310D2D52 for <linux-kernel@vger.kernel.org>; Fri, 11 Aug 2023 02:58:11 -0700 (PDT) Received: from loongson.cn (unknown [10.2.9.158]) by gateway (Coremail) with SMTP id _____8BxyeoyBtZkNoAVAA--.36189S3; Fri, 11 Aug 2023 17:58:10 +0800 (CST) Received: from kvm-1-158.loongson.cn (unknown [10.2.9.158]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dx5swtBtZkyshUAA--.59296S3; Fri, 11 Aug 2023 17:58:09 +0800 (CST) From: Bibo Mao <maobibo@loongson.cn> To: Huacai Chen <chenhuacai@kernel.org>, Marc Zyngier <maz@kernel.org> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>, Jianmin Lv <lvjianmin@loongson.cn>, linux-kernel@vger.kernel.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v6 1/2] irqchip/loongson-eiointc: Fix return value checking of eiointc_index Date: Fri, 11 Aug 2023 17:58:04 +0800 Message-Id: <20230811095805.2974722-2-maobibo@loongson.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230811095805.2974722-1-maobibo@loongson.cn> References: <20230811095805.2974722-1-maobibo@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Dx5swtBtZkyshUAA--.59296S3 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj9xXoWruFWxJrWDKr4rGryDXFW5Arc_yoWDArg_uF n29ws3Jr1F9r1xX397Zr4UZryfta4jg3Wv9F4UuF15A34jqw1rCrZFy3sxJFs2gF4fAF95 CrWYkr1Sy34IkosvyTuYvTs0mTUanT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb3AYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1ln4kS14v26r1Y6r17M2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r12 6r1DMcIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_ Jrv_JF1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1V AY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAI cVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42 IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIev Ja73UjIFyTuYvjxUc0eHDUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773927124463362423 X-GMAIL-MSGID: 1773927124463362423 |
Series |
irqchip/loongson-eiointc: Add simple irq routing method
|
|
Commit Message
maobibo
Aug. 11, 2023, 9:58 a.m. UTC
Return value of function eiointc_index is int, however it is converted into uint32_t and then compared smaller than zero, this will cause logic problem. Fixes: dd281e1a1a93 ("irqchip: Add Loongson Extended I/O interrupt controller support") Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- drivers/irqchip/irq-loongson-eiointc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index 92d8aa28bdf5..1623cd779175 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -144,7 +144,7 @@ static int eiointc_router_init(unsigned int cpu) int i, bit; uint32_t data; uint32_t node = cpu_to_eio_node(cpu); - uint32_t index = eiointc_index(node); + int index = eiointc_index(node); if (index < 0) { pr_err("Error: invalid nodemap!\n");