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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74050C5DF7D for ; Fri, 21 Aug 2026 08:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=log9Y1/FtX7D4hpSxqOjc6RYDMSqMNLwZMRoYqyuEwE=; b=xtYtzF2SSc9HMlTTrgMoQ8V/6w 0QpNaBGhtGPAhlHuPLv2Cd2765kYd2DDJLnMJCRqns9Hs80hjFb0+o03DLoF25ydzTiXeDQTkE7Cq YWuNbVAd2Thy1YN5jubXx4ICCXluXjInHCYp1bjBoJxUoLw/Ow0km7CDyYoTruyv5/FtdBIZ7ha1j G21hee2HJX+Zd3QeoALVqHIiLZfJLftK/em4V/eB1kXn/SZiAn5nqpwj10N4IgswtW7ol3bSbKB3A D2tMO+1vX13zJEBBAUkuQbBrS1dlQsbTL7cWxuz+xFq9LuGGd7vMNCIhg4QhMmVKwM7HcPsWuY/p/ BnBOFVeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wxKIn-0000000CliU-3IFQ; Fri, 21 Aug 2026 08:08:37 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wxKIl-0000000Clhu-3iKD; Fri, 21 Aug 2026 08:08:35 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 40907431E3; Fri, 21 Aug 2026 08:08:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C35361F000E9; Fri, 21 Aug 2026 08:08:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787299715; bh=log9Y1/FtX7D4hpSxqOjc6RYDMSqMNLwZMRoYqyuEwE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=a+gRjS8ypMPY4upPxQqn7EhNHpp/wLA9eFbeqPkRIFc4PcWLkxdTApSE9rNoRh1VN ckqOFqmlIuGgzk805hQVKJkEni3qBXfkPEWpFZ4+vPb8opDeut3L9gkOU4q8vuPgX9 TZ9qhSgPJpT+M4Dk1C1MoKrA2W7hu9G9lqmc5AtrQkRBv/tMfHVYKR0NOgjFEJMwmB S/eHEnKAXmXjmVz6rlGoOxIOm4lA3KMBwVYxAEF7X7nrEaar0OUfWVydllmT6OPFTK sEN4uXUNQneR8CH056dQbqXL7xbvJD04vs1NEoKWHzKWJz+nh9v7aLW4kQQ1a4VEIA pbgq8bjA0UF+A== Date: Fri, 21 Aug 2026 11:08:24 +0300 From: Mike Rapoport To: Mukesh Pilaniya Cc: Pratyush Yadav , Philipp Rudo , Catalin Marinas , Will Deacon , Mark Rutland , Huacai Chen , WANG Xuerui , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Andrew Morton , Baoquan He , Pasha Tatashin , Tao Liu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, kexec@lists.infradead.org Subject: Re: [PATCH v2 2/2] kexec: fix error propagation in kexec_image_probe_default() Message-ID: References: <20260819-mpilaniy-v2-0-95e929ede0e5@redhat.com> <20260819-mpilaniy-v2-2-95e929ede0e5@redhat.com> <20260820142114.0a36ac78@rotkaeppchen> <2vxzik54zmpp.fsf@kernel.org> <713ab0a0-235d-47cf-a0c2-73249fbc8f74@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <713ab0a0-235d-47cf-a0c2-73249fbc8f74@redhat.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 21, 2026 at 12:48:15PM +0530, Mukesh Pilaniya wrote: > Hi Philipp, > > On 20/08/26 11:41 pm, Pratyush Yadav wrote: > > On Thu, Aug 20 2026, Philipp Rudo wrote: > > > >> Hi Mukesh, > >> Hi Pratyush, > >> > >> having this patch makes sense. Personally I'd go with having a > >> switch-case rather than individual if-blocks. E.g. > >> > >> switch (ret) { > >> case 0: > >> image->fops = *fops; > >> return 0; > >> case -ENOEXEC: > >> continue; > >> default: > >> return ret; > >> } > >> > >> IMHO that is better readable and easier to extend in case other error > >> codes need special handling as well. But that is only my personal > >> opinion. > > > > Well, IMO both look roughly the same so I unless Mukesh prefers your > > version more, we can keep it as-is. > > > Thanks for the review. I agree the switch-case reads nicely, but since > the current version is functionally equivalent and already > reviewed, I'll keep it as-is to avoid re-spinning for a style change. > Happy to switch if you or Pratyush feel strongly about it. I'd like to request another style change :) In newer code we often use 'err' rather than 'ret', so it's more obvious what this variable about. I don't feel strong about if or switch, but if you go with if, please don't compare to 0, use !err. -- Sincerely yours, Mike.