Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34151798rwd; Sun, 9 Jul 2023 06:13:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlHSaYcbhdl0A3DU0xmlhxH/2sCYji6bP6YMjMNo7DgBkKfdla+d0qUg01qWHunYe93iAiQr X-Received: by 2002:a05:6a20:1603:b0:10e:d4fb:b031 with SMTP id l3-20020a056a20160300b0010ed4fbb031mr9512409pzj.61.1688908389866; Sun, 09 Jul 2023 06:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688908389; cv=none; d=google.com; s=arc-20160816; b=ADtpvYD+UQqsLsjJhQIfP0VHrbHlOBlRTJ620RCFxI46ihTRSsaV0ypLByoFYaZJmt G3sgpgm1kD4yXpI516A77O3kBCOQKadmN1NoDk6bL7pJzMK8j/dlmsi53srJi4VmhOtK PQISkvbHbaMsXWR3THaQGBmAlKIHv/62OS/9j5tKVy8nrC2TPdpglh4R4Mbf3UcZAnPp HDK2ChooxHcHgkZfJGksB0f+QBXrhFbqRw4OKZiw0dItGZXifizx3dYRWamLxjVvOyiS n9u/KX6LG1yFlVhSRXv+0hWLL9bx9qIHkKtUDbyREUur2TNysODAp7LgW9jCxk9XrWb/ 65UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=s97t/7S8+gqReiJcULLkNP6Hs0fkyeH3nSWl2qRa1LU=; fh=oUXT0WwcpZLviTrQwnNPNfgK4mIHm7pn41x48inutU4=; b=uMQebMxm/UiQV3tjf41hvVzH3+eMfWUNNemuxyD+FO8PhTHdFUYm+5x+t7MnlusVFv 0YBKAfSyhBqJb9Lk9wmVXmAXXF3QxgtvzEmWBv28OOi6Xg0Jt/kw82Yayju3XClAVZv3 z+3tgh61Yqlub7MUj08n7BkfcxPJD2VA/s3MOBtY1I14W+0bfYhA+Qk1KQpwWoT1Cpzk G1UQFxuk4TgJcuHCki8BNc59GkZDLO8aNFFWcIzDzcWX8jYB4EDioNVFltKWtU6JvYYO ZNfPLg3kvvsZxaMixplsCQzIczYXNrLMy0uZBKX7JdEdj1y6Boze4uaHpCx3P2Jork9I RWXA== 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 c3-20020aa78803000000b006762f8fe108si6844434pfo.111.2023.07.09.06.12.58; Sun, 09 Jul 2023 06:13:09 -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 S230298AbjGIL6w convert rfc822-to-8bit (ORCPT + 99 others); Sun, 9 Jul 2023 07:58:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230030AbjGIL6v (ORCPT ); Sun, 9 Jul 2023 07:58:51 -0400 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B4E1E8; Sun, 9 Jul 2023 04:58:50 -0700 (PDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qIT3m-001zBV-8x; Sun, 09 Jul 2023 13:58:38 +0200 Received: from dynamic-077-191-183-238.77.191.pool.telefonica.de ([77.191.183.238] helo=[192.168.1.11]) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qIT3m-00179R-1u; Sun, 09 Jul 2023 13:58:38 +0200 Message-ID: Subject: Re: [PATCH] [RFT] sh: mach-r2d: Handle virq offset in cascaded IRL demux From: John Paul Adrian Glaubitz To: Geert Uytterhoeven , Guenter Roeck , Sergey Shtylyov , Yoshinori Sato , Rich Felker Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 09 Jul 2023 13:58:28 +0200 In-Reply-To: <2c99d5df41c40691f6c407b7b6a040d406bc81ac.1688901306.git.geert+renesas@glider.be> References: <2c99d5df41c40691f6c407b7b6a040d406bc81ac.1688901306.git.geert+renesas@glider.be> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 77.191.183.238 X-ZEDAT-Hint: PO X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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 Hi! On Sun, 2023-07-09 at 13:15 +0200, Geert Uytterhoeven wrote: > diff --git a/arch/sh/boards/mach-r2d/irq.c b/arch/sh/boards/mach-r2d/irq.c > index e34f81e9ae813b8d..c37b40398c5bc83e 100644 > --- a/arch/sh/boards/mach-r2d/irq.c > +++ b/arch/sh/boards/mach-r2d/irq.c > @@ -117,10 +117,10 @@ static unsigned char irl2irq[R2D_NR_IRL]; > > int rts7751r2d_irq_demux(int irq) > { > - if (irq >= R2D_NR_IRL || irq < 0 || !irl2irq[irq]) > + if (irq >= 16 + R2D_NR_IRL || irq < 16 || !irl2irq[irq - 16]) > return irq; > > - return irl2irq[irq]; > + return irl2irq[irq - 16]; > } > > /* Btw, I think this needs to be adjusted to test for "ret <= 0" since IRQs cannot be zero anymore, correct? > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mfd/sm501.c#n1389 Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913