Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751806AbXBCW4X (ORCPT ); Sat, 3 Feb 2007 17:56:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751816AbXBCW4X (ORCPT ); Sat, 3 Feb 2007 17:56:23 -0500 Received: from gepetto.dc.ltu.se ([130.240.42.40]:54445 "EHLO gepetto.dc.ltu.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751806AbXBCW4W (ORCPT ); Sat, 3 Feb 2007 17:56:22 -0500 Message-ID: <45C51310.6070304@student.ltu.se> Date: Sat, 03 Feb 2007 23:56:16 +0100 From: Richard Knutsson User-Agent: Thunderbird 1.5.0.9 (X11/20061219) MIME-Version: 1.0 To: "Ahmed S. Darwish" CC: linux-kernel@vger.kernel.org Subject: Re: A CodingStyle suggestion References: <20070203215848.GA10440@Ahmed> In-Reply-To: <20070203215848.GA10440@Ahmed> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 708 Lines: 31 Ahmed S. Darwish wrote: > Hi all, > > In CodingStyle Chapter 16 "Function return value and names", why not > adding a comment about the favorable community way of checking the return > value. ie: > > ret = do_method(); > if (ret) { > /* deal with error */ > } > > and not other ways like: > > if (do_method()) or So: if (is_true()) { /* do something */ } is alright then? If so, I agree, but please make it real clear in the document ;) Richard Knutsson - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/