From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753960AbbJPIwe (ORCPT ); Fri, 16 Oct 2015 04:52:34 -0400 Received: from mail-lf0-f43.google.com ([209.85.215.43]:36855 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752792AbbJPIwb (ORCPT ); Fri, 16 Oct 2015 04:52:31 -0400 MIME-Version: 1.0 In-Reply-To: <20151013204842.4d43cdfb@grimm.local.home> References: <1443545176-3215-1-git-send-email-0x7f454c46@gmail.com> <20151013204842.4d43cdfb@grimm.local.home> From: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri, 16 Oct 2015 11:52:09 +0300 Message-ID: Subject: Re: [PATCH 1/5] ftrace: remove redundant strsep in mod_callback To: Steven Rostedt Cc: mingo@redhat.com, Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-10-14 3:48 GMT+03:00 Steven Rostedt : >> - ret = ftrace_match_module_records(hash, func, mod); >> - if (!ret) >> - ret = -EINVAL; >> + ret = ftrace_match_module_records(hash, func, param); >> + if (ret == 0) > > Small nit, personally, I prefer the if (!ret) version. > > For me "== 0" is for counters and strcmp. I may change this to be > consistent with the rest of the code. > > -- Steve Ok, I thought "== 0" will be more readable near comparison "< 0", but anyway, (!ret) is good. > >> + return -EINVAL; >> if (ret < 0) >> return ret; >>