From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 268FDC388F2 for ; Thu, 22 Oct 2020 09:47:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE609223BF for ; Thu, 22 Oct 2020 09:47:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2896124AbgJVJrH (ORCPT ); Thu, 22 Oct 2020 05:47:07 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2998 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2509987AbgJVJrG (ORCPT ); Thu, 22 Oct 2020 05:47:06 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 5C76F6BEFE8400EDCBF0; Thu, 22 Oct 2020 10:47:05 +0100 (IST) Received: from [10.47.5.196] (10.47.5.196) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1913.5; Thu, 22 Oct 2020 10:47:03 +0100 Subject: Re: [PATCH 1/2] perf jevents: Tidy error handling To: kajoljain , Namhyung Kim CC: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Yao Jin , , linux-kernel , Linuxarm References: <1603121908-53543-1-git-send-email-john.garry@huawei.com> <1603121908-53543-2-git-send-email-john.garry@huawei.com> <3fda581b-3f2b-5dce-b388-916117d20e7c@huawei.com> <7e7c5aeb-5c9b-727a-d605-e871007af34a@linux.ibm.com> From: John Garry Message-ID: <348855b5-d109-3e30-a669-d4e2c766ad30@huawei.com> Date: Thu, 22 Oct 2020 10:43:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <7e7c5aeb-5c9b-727a-d605-e871007af34a@linux.ibm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.47.5.196] X-ClientProxiedBy: lhreml706-chm.china.huawei.com (10.201.108.55) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/2020 14:37, kajoljain wrote: >>> May be we can use similar checks: >>> >>> if( verbose) >>>    pr_info("%s: Error walking file tree %s%s\n", prog, ldirname,err_string_ext); >>> if(rc > 0) >>>     empty_map = 1; >>> else >>>    ret = 1; >>> >> Not that it matters much, this logic is slightly different for verbose set and rc < 0. I don't mind going with that, so let me know. > Yes right. Sure if required we can made changes on these checks and include appropriate condition for verbose set and rc < 0. Seems fine to me. I will just revert to the original logic for now. Someone can try to change later if they want. Thanks