From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Enberg Subject: Re: [RFC 00/12] Overhaul of error handling and module init/uninit Date: Mon, 19 Dec 2011 23:29:53 +0200 Message-ID: References: <1324303114-5948-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: mingo@elte.hu, gorcunov@gmail.com, asias.hejun@gmail.com, kvm@vger.kernel.org To: Sasha Levin Return-path: Received: from mail-tul01m020-f174.google.com ([209.85.214.174]:57217 "EHLO mail-tul01m020-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752361Ab1LSV3z (ORCPT ); Mon, 19 Dec 2011 16:29:55 -0500 Received: by obcwo16 with SMTP id wo16so1958371obc.19 for ; Mon, 19 Dec 2011 13:29:54 -0800 (PST) In-Reply-To: <1324303114-5948-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Dec 19, 2011 at 3:58 PM, Sasha Levin wrote: > This patch series is really a work in progress, but is mature enough to > cover most of the different modules we have in the tool, and receive > comments regarding the work done so far and any future work. > > There were three main goals while doing this work: > 1. Less die(), more clean exits. We are not interested in hitting a die() > during regular program flow. die() should be reserved to extreme cases where > we are not able to report the error back. > > 2. Adding actual error handling where it was missing. Starting from simple > things like checking malloc()s, through making functions report their failures > (this meant switching lots of functions from 'void' to 'int' since they can > actually fail), and all the way to being able to handle errors by > uninitializing and exiting gracefully. > > 3. Getting initialization and uninitialization of modules somewhat > standard. The main purpose here is to be able to either add __init functions > or to be able to call all initialization functions from a single place without > code duplication. You're mixing up cleanups (especially whitespace ones) and fixes which is painful to deal with. So how about submitting the cleanups first without changing code logic to get them out of the way? Pekka