Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262590AbTESShE (ORCPT ); Mon, 19 May 2003 14:37:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262598AbTESShE (ORCPT ); Mon, 19 May 2003 14:37:04 -0400 Received: from warrior.services.quay.plus.net ([212.159.14.227]:58016 "HELO warrior.services.quay.plus.net") by vger.kernel.org with SMTP id S262590AbTESShB (ORCPT ); Mon, 19 May 2003 14:37:01 -0400 From: "Riley Williams" To: "Ingo Oeser" , "Rusty Russell" Cc: Subject: RE: try_then_request_module Date: Mon, 19 May 2003 19:50:02 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <20030519110832.G626@nightmaster.csn.tu-chemnitz.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1182 Lines: 40 Hi Ingo. > Usually this is all as simple as: > > int module_loaded_flag=0; > > retry_with_module_loaded: > > /* search code */ > > if (!module_loaded_flag && !found) { > module_loaded_flag=1; > if (!request_module(bla)) > goto retry_with_module_loaded; > } > return found; > > which is very space efficient and also still readable. Out of curiosity, what exactly is the purpose of the goto in the above code? Since we set module_loaded_flag just prior to it, the first if statement must fail after the goto, so we just fall down to where we would have been without the goto. It all looks a tad pointless to me... Best wishes from Riley. --- * Nothing as pretty as a smile, nothing as ugly as a frown. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.481 / Virus Database: 277 - Release Date: 13-May-2003 - 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/