From patchwork Wed Feb 3 06:16:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerrit Renker X-Patchwork-Id: 44348 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 22CDBB7D53 for ; Wed, 3 Feb 2010 17:17:20 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755772Ab0BCGRP (ORCPT ); Wed, 3 Feb 2010 01:17:15 -0500 Received: from dee.erg.abdn.ac.uk ([139.133.204.82]:37465 "EHLO erg.abdn.ac.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753544Ab0BCGRN (ORCPT ); Wed, 3 Feb 2010 01:17:13 -0500 Received: from laptev.erg.abdn.ac.uk (Debian-exim@ra-gerrit.erg.abdn.ac.uk [139.133.204.38]) by erg.abdn.ac.uk (8.13.4/8.13.4) with ESMTP id o136Gupi025090 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Feb 2010 06:16:57 GMT Received: from gerrit by laptev.erg.abdn.ac.uk with local (Exim 4.69) (envelope-from ) id 1NcYXo-0001Py-B3; Wed, 03 Feb 2010 07:16:56 +0100 Date: Wed, 3 Feb 2010 07:16:56 +0100 From: Gerrit Renker To: Neil Horman Cc: davem@davemloft.net, dccp@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v2 1/1] dccp: fix auto-loading of dccp(_probe) Message-ID: <20100203061656.GA5415@gerrit.erg.abdn.ac.uk> Mail-Followup-To: Gerrit Renker , Neil Horman , davem@davemloft.net, dccp@vger.kernel.org, netdev@vger.kernel.org References: <1265005087-5549-1-git-send-email-gerrit@erg.abdn.ac.uk> <1265005087-5549-2-git-send-email-gerrit@erg.abdn.ac.uk> <1265005087-5549-3-git-send-email-gerrit@erg.abdn.ac.uk> <20100201122119.GC25094@hmsreliant.think-freely.org> <53767.148.187.160.35.1265123175.squirrel@148.187.160.35> <20100202153929.GA12697@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100202153929.GA12697@hmsreliant.think-freely.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-ERG-MailScanner: Found to be clean X-ERG-MailScanner-From: gerrit@erg.abdn.ac.uk X-Spam-Status: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Neil, I have tested your patch, it works fine thanks to the repeated execution of the macro argument. I have reformatted it, removing the inner parentheses, which I think is justified since macros copy their arguments in full. Also converted your email to a drafted commit message. Due to this, have not copied your signed-off -- if you are ok, please add, this should be submitted asap. >>>>>>>>>>>>>>>>>>>>>>>>>>> Patch v2 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< dccp: fix loading of dccp_probe This fixes commit (38ff3e6bb987ec583268da8eb22628293095d43b) ("dccp_probe: Fix module load dependencies between dccp and dccp_probe", from 15 Jan). It fixes the construction of the first argument of try_then_request_module(), where only valid return codes from the first argument should be returned. What we do now is assign the result of register_jprobe() to ret, without the side effect of the comparison. Acked-by: Gerrit Renker Signed-off-by: Neil Horman --- net/dccp/probe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/dccp/probe.c +++ b/net/dccp/probe.c @@ -161,8 +161,8 @@ static __init int dccpprobe_init(void) if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) goto err0; - ret = try_then_request_module((register_jprobe(&dccp_send_probe) == 0), - "dccp"); + try_then_request_module((ret = register_jprobe(&dccp_send_probe)) == 0, + "dccp"); if (ret) goto err1;