From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1911EC433EF for ; Mon, 18 Jul 2022 14:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235785AbiGRONA (ORCPT ); Mon, 18 Jul 2022 10:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231547AbiGROM7 (ORCPT ); Mon, 18 Jul 2022 10:12:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 603142714C for ; Mon, 18 Jul 2022 07:12:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 01EA8B81614 for ; Mon, 18 Jul 2022 14:12:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC29EC341CA; Mon, 18 Jul 2022 14:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658153575; bh=lAyLGA1ga5i/mbtugNsD7EuylCnrcNL+KcACQIH7saE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r/ahhqjzE/83r0IZ2ZwRYQSad/9bPaGGh8JTrGbrCPQ3g4eLB2Qzkwh3zqLg03VZX IgrxoEEonU4Dj8YvJiJ/dAWSbGDAgY6se9ljv04OJZWDx+KDEtQueAB52E/ghYJDwi ziVDwcrE5vap2VTzpvpH4nQ3Rftcfp+CIyOZG9/qt6LexbPuXTH73oyQXSl7az7j2S 9ya770S+/20+qQ1tZ5hWveWI4E76DVamEPwDMJ17+ej9eBXNRmRs6ssMejG+Xpzg6p OolxABSP4l/G+zWjOEoFBV6QIGtirwK9OIm2TYWD2TNyow2da6p/5pgc58WfuLvQOa 5veWYcoLNupLA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oDRUT-008EOi-8o; Mon, 18 Jul 2022 15:12:53 +0100 Date: Mon, 18 Jul 2022 15:12:53 +0100 Message-ID: <87r12izeze.wl-maz@kernel.org> From: Marc Zyngier To: Xu Qiang Cc: , , Subject: Re: [PATCH -next 1/2] irqdomain: fix possible uninitialized variable in irq_find_mapping() In-Reply-To: <20220718130759.67777-2-xuqiang36@huawei.com> References: <20220718130759.67777-1-xuqiang36@huawei.com> <20220718130759.67777-2-xuqiang36@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: xuqiang36@huawei.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, rui.xiang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Jul 2022 14:07:58 +0100, Xu Qiang wrote: > > In irq_find_mapping,ret value may be uninitialized.However,even if > the local variable irq is initialized, it only solves the uninitialized > problem and ret value is still an incorrect virq, so my modification > method is to set virq in __irq_resolve_mapping function. I think I understand what you are fixing, but I sadly don't understand the commit message. Here's what I suggest as a commit message: When using a NOMAP domain, __irq_resolve_mapping() doesn't store the Linux IRQ number at the address optionally provided by the caller. While this isn't a huge deal (the returned value is guaranteed to the hwirq that was passed as a parameter), let's honour the letter of the API by writing the expected value. Does this match what you expected? Thanks, M. -- Without deviation from the norm, progress is not possible.