From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E121309EE2 for ; Fri, 21 Aug 2026 13:23:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787318588; cv=none; b=C/45z/r6i+rKKzdMOg+bh5FNfjS6Cji7uv+0dpsi+vA7HfbReTUZ+Ucwzfa+ya0Ls+WIi1BsQiW2ROBJQvn1CC0yyjn+/xixPhVKfOVKF4O9kFt3UVAz10TpaeYT90Grk/GeGvTSGaMyLlbSTehuZ+6zE0J5ESqqhY+AA+3jSx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787318588; c=relaxed/simple; bh=UN+XnWuwaeAZ1O/mhj1Cyi3C2jGioQY1BU3xg8YedPY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lVroXKn+YdmjA3Ig+6+DJ9yRgQG7eRgQ2KfKZLlutQawYl3q5Fwk9VjWIZcLYmgYzC634AKjU/FCsyhJjxE2OHzSSUkTCFI9SXmV6iysM4imsm0zmlG8lwb5eY6haZmex6SK7F2Xkh9k+Prz+mJtooIFUqDSvVsFQURn24+zN0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YkYXGGcm; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=CMGFFdOm; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YkYXGGcm"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="CMGFFdOm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1787318576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yT6AXtl3rcDOrA8CHC13zOchRPUX94+zGeSqbRBwczI=; b=YkYXGGcmwi9AG/sm0VkkStgG1aa98dzwds6f1iqlbVjdpSb/81qvzkeEdcSgU+hc27qxwe OHsxFG4IxDNI59e8Ug/TKSVSbku5kUT+v7J3ebOT2savjlwDydibbC9+Bu/7tYtutwfdDL 0GGNIChRc7c28ORJn0DSReDrfMHt9xo= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-599-0vL_J8BDPBOZLixyPZoZAQ-1; Fri, 21 Aug 2026 09:22:55 -0400 X-MC-Unique: 0vL_J8BDPBOZLixyPZoZAQ-1 X-Mimecast-MFC-AGG-ID: 0vL_J8BDPBOZLixyPZoZAQ_1787318574 Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-848860def2cso1065037b3a.2 for ; Fri, 21 Aug 2026 06:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1787318574; x=1787923374; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yT6AXtl3rcDOrA8CHC13zOchRPUX94+zGeSqbRBwczI=; b=CMGFFdOmIBIEQeeytZsW9JVaeMgaV9CT40GGaKW992UnPGlD3DDbIkINpI6iBT5qw/ SWY/04FqgOqmMLqowXnacux8X50kNTSCf4e9YlG9LpaUDbtnw/wRwxy3arr7WPsWj+LF XSrdlapyiiG0GYKKn5EKIxvpduxyzG4kj+607iV0N7ornrFeqbI30Kwnq+oJA3t7oNTz oADzPP1ICLCOGtktO3GKSjcxovap8SJt4PrrzY3/UIHoItF/EA/jfwSdMoPe+P2Ni1Mm y3hGv8zG4RTSCkUc1s7/2z8F9C0Q2IAwFVeqAVsWYevPzOlS74tGIiOXhHh744YFIPYU wEHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787318574; x=1787923374; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yT6AXtl3rcDOrA8CHC13zOchRPUX94+zGeSqbRBwczI=; b=T/jf9xlSnDKwF12V6YWZXDL3n7iynrNPNiNzl6eAN/GIH/csOiPby0cFJv5zi00fK/ GY04Iy/fjVnG07ZdTCjGnm5LB3jZqIIUV26F/zDEut3qxdvEz57HzQeEbie6emfJes4n 6W7qivU+gDqfMOB8PjDDOm8IkyEZp3LRdAIS9gYq0gFe1cHRjnoAmoH+kraojWnEd+Ls ddCA1yEcyHpLZmxeOlxyqk//SvkN+ZHLPDJzFJnAo/7Qq1zhlkR92JskKEyuj9hRX9ys T26XQhZ8w7Q/lYJfP0omoHwk2HxXoAjLaLNzbFWVb+hfO1JodQX3VU6Koemfdzdmjn/4 +jnw== X-Forwarded-Encrypted: i=1; AHgh+Rponj7FdNaYwCp5ZAJDnkMqxgI+rAYR1IAqzRx3PLp6Nh61puM/IKekYLbpFdBsVhPgt6ggWbYmBeyEmSE=@vger.kernel.org X-Gm-Message-State: AFuF++mPEi9q7FzqZ0Tu2JEMX1xY0tZvCCycn9zZmPy4j5z4Jox8tGK5 Z0PQNEH3WnBKmP412p0YtkCHD7L1O+FYWtuiDUY2C1nYtazCMfMkKV5vsKG/3ZCqehKZ4ZO1Kak Fyx2S5SGQ5qK696dKACd5ReABx4wDutflRI3P8zEo2NlGf0fpH1G7sifaa7NBUX8xEA== X-Gm-Gg: AR+sD13MGUCSc9jP4+Xg3m2dfspiVngOq+IYXpZWPDucaNUJFEbcPQL0xgT8LGdbZpe 4K7wXLM4docr8O8r65cBnC8i+9Ju/EMudE8zCrk5o+9w+caITisbcag7KOiuvG5JrTEvsaH0EGZ oBuEQeGFLxvInGuNkZynwAwo8a1gLCsVqRBcex8viiqghkSQ9olXMeIy9KgtJQ0X0fSP+8yxuod D5H7I/XaSgYtzp0Z3XEpPt1uFVhIn4gjNAz3b4IEyQbbq/RefHtPzcDUXkKcSN/u7BSJzT4P8ES xgHaRInM7sXKMX8+l7822Zkg7bcI4/MxhJCWoXYggcpmGizJ2/rPvXKVsViK473ESVyr/VO2QGj QPdHjcm6oeydxBT7haw== X-Received: by 2002:a05:6a00:1c86:b0:846:de21:3da4 with SMTP id d2e1a72fcca58-851f9cc6dfemr11345709b3a.3.1787318573996; Fri, 21 Aug 2026 06:22:53 -0700 (PDT) X-Received: by 2002:a05:6a00:1c86:b0:846:de21:3da4 with SMTP id d2e1a72fcca58-851f9cc6dfemr11345592b3a.3.1787318573542; Fri, 21 Aug 2026 06:22:53 -0700 (PDT) Received: from [192.168.1.3] ([122.171.22.116]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-851d3389a37sm2905604b3a.15.2026.08.21.06.22.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Aug 2026 06:22:53 -0700 (PDT) Message-ID: <62cb1c7d-aa17-4d6d-b780-97cc40b7ff91@redhat.com> Date: Fri, 21 Aug 2026 18:52:44 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] kexec: fix error propagation in kexec_image_probe_default() To: Mike Rapoport 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 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> Content-Language: en-US From: Mukesh Pilaniya In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Mike, thanks for review. On 21/08/26 1:38 pm, Mike Rapoport wrote: > 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. > Makes sense, will rename ret to err and use !err in v3. -- Regards, Mukesh Pilaniya