From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932184AbdJXO0i (ORCPT ); Tue, 24 Oct 2017 10:26:38 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49269 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbdJXO0g (ORCPT ); Tue, 24 Oct 2017 10:26:36 -0400 Date: Tue, 24 Oct 2017 17:26:15 +0300 From: Dan Carpenter To: Garry Hurley Cc: SF Markus Elfring , Jani Nikula , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, Joonas Lahtinen , kernel-janitors@vger.kernel.org, LKML , Rodrigo Vivi , Zhi Wang Subject: Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer() Message-ID: <20171024142615.t3y5atz6nulkq55h@mwanda> References: <87efpsiu7r.fsf@intel.com> <636f6272-9074-53dc-2c90-cbb4a7cd0901@users.sourceforge.net> <1A433E6A-DE06-4407-9E33-3CBBA4ADF01B@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1A433E6A-DE06-4407-9E33-3CBBA4ADF01B@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The point of unwind code is to undo what was done earlier. If a function allocates a list of things, using standard unwind style makes it simpler, safer and more readable. This isn't the case here. Instead of making the code more readable, we're making it more convoluted. It's just that two out of three error messages happened to be the same and Markus wants to save a bit of memory by using the same string. The memory savings is not so big that it's worth making the code less readable. regards, dan carpenter