From patchwork Thu May 13 13:27:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "liuqi (BA)" X-Patchwork-Id: 12255809 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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 48349C433B4 for ; Thu, 13 May 2021 13:31:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EAA89613B6 for ; Thu, 13 May 2021 13:31:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAA89613B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fzDZh2DIVq1axkxmwHEqR5/C0qdlaOnA8AaIoc4aMqs=; b=LJwrWEnkmlgt4Aucnr6uLtIfw XehI03o/jktTfwpIyFOHclcuteLhC/5QRSPK/u5BhlR1pMoL49uWMtsotP/rZ05G41R4y3k1mtn8d TC813sPsOduAkOfCKPHFl+PZFEUJm+egWUme/DvW4uii62bCan71ECgnA5lzIi6SKWP27oa0q4CZ1 XLjfl4vf7IRSdGC14bv386OnY/n+LMquoV5eqXgCc+0w226iBJglG5u0lGm3TDPjhE+dgAnLYwhtT RnLBn/sp49jff2J7ILtgwd0D0lxEEAE44VXFejYgojp0komSrwkzcyt0gPimfgLVWzmnHxi/TMcwt Zdi7HQuBQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhBOI-005bhx-DQ; Thu, 13 May 2021 13:28:38 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhBNy-005bgr-5u for linux-arm-kernel@desiato.infradead.org; Thu, 13 May 2021 13:28:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=p5fBATYCllSM6F3/NMFgG+IQcmdGO9UEdSt5vczaSNs=; b=gaWSGmMoRW1QUVvH/UF7wBgbdu Vr2MfKDJW2+UyEgM2k0vVmtZQSaCi7CHOw8WAjti0uftukjuBeW2HkpOUbzwKp4UbPZOiW7r0qgyL tSGK7q9lpTTdcSVgTbLlAXAB/Md1m4fPH/39DfYMFjQV5m1t+L8Ijvu6Tjaqaq2WVEWXEQhbF6uBQ O4881aPAFoccxYhNDIdjZEaSciC1K+mKJEEN6+vHeIq2Wy1u3UJYvQdHZu1oKqu/oKRNxtPR/QR4Q gGfv+oV6TbJgEMJCgvKhvDw6C4S3AtxA9G4tf7sDIM8J5HVRbWYA4fJlAR61dNhEjaj22yg6mqeZy WXdHlESw==; Received: from szxga05-in.huawei.com ([45.249.212.191]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhBNs-00BGzt-Un for linux-arm-kernel@lists.infradead.org; Thu, 13 May 2021 13:28:16 +0000 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Fgspq0J0RzsRJ0; Thu, 13 May 2021 21:25:23 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Thu, 13 May 2021 21:27:54 +0800 From: Qi Liu To: , , CC: , , , Subject: [PATCH 3/3] coresight: etm4x: core: Remove redundant check of attr Date: Thu, 13 May 2021 21:27:49 +0800 Message-ID: <1620912469-52222-4-git-send-email-liuqi115@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1620912469-52222-1-git-send-email-liuqi115@huawei.com> References: <1620912469-52222-1-git-send-email-liuqi115@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210513_062813_172501_BB2B210A X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Junhao He "attr" is checked by perf framework, so remove the redundant check in etm4_parse_event_config(). Signed-off-by: Junhao He Signed-off-by: Qi Liu --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index db88199..da27cd4 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -568,11 +568,6 @@ static int etm4_parse_event_config(struct etmv4_drvdata *drvdata, struct etmv4_config *config = &drvdata->config; struct perf_event_attr *attr = &event->attr; - if (!attr) { - ret = -EINVAL; - goto out; - } - /* Clear configuration from previous run */ memset(config, 0, sizeof(struct etmv4_config));