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=-17.0 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 08A63C433DB for ; Thu, 25 Mar 2021 07:18:24 +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 A321561A12 for ; Thu, 25 Mar 2021 07:18:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A321561A12 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=hisilicon.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=pEBC4adDhsR/Tpp/eYE9YC3OwjmA1I96/g81Tprzm+U=; b=WVqfJHwhTLMqYr7gWeV0kLvCl M0brFXTOFt2Qu0mKG3xLxcCjOPs2gvphh7Va25rz9B7iZdrIHMeo/JWHOCrwA1WoNFcJouDMbdu1q c3HykNn9NHd5gFoZqqQUIJgKpJ0H7WCDD6Ux8Rmsqp8MGsu0gwObLt2XTEynKVA7sW4ET45IsKCCQ TdK4BaTmhmi4Xpgyc2gWRO295id1IY4AXn6dG7WxlsD4dbhdRBKzebkedxqbdOKgl4Bd9iJzt7wws pSMU1LNRSSxt0gmokMubAg4t+3ASPdfkWzi74GWkyhivvuvR+GQEuADfbDaobYweRvqenSHXZxnWJ HuMQwMX/g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPKEf-000lNm-Oe; Thu, 25 Mar 2021 07:16:54 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPKE6-000lDh-3e for linux-arm-kernel@lists.infradead.org; Thu, 25 Mar 2021 07:16:20 +0000 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F5btr1cj1z19J1x; Thu, 25 Mar 2021 15:13:56 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Thu, 25 Mar 2021 15:15:52 +0800 From: Tian Tao To: , CC: Subject: [PATCH drivers/perf 4/4] drivers/perf: fixing coding style issues Date: Thu, 25 Mar 2021 15:16:24 +0800 Message-ID: <1616656584-22658-5-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1616656584-22658-1-git-send-email-tiantao6@hisilicon.com> References: <1616656584-22658-1-git-send-email-tiantao6@hisilicon.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-20210325_071618_579398_10E10103 X-CRM114-Status: GOOD ( 11.78 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org no functional changes. Fix checkpatch error: ERROR: do not use assignment in if condition #210: FILE: arm_pmu_platform.c:210: + if (node && (of_id = of_match_node(of_table, pdev->dev.of_node))) { Signed-off-by: Tian Tao Signed-off-by: Junhao He Signed-off-by: Qi Liu --- drivers/perf/arm_pmu_platform.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c index 933bd84..11b47c6 100644 --- a/drivers/perf/arm_pmu_platform.c +++ b/drivers/perf/arm_pmu_platform.c @@ -191,7 +191,7 @@ int arm_pmu_device_probe(struct platform_device *pdev, const struct of_device_id *of_table, const struct pmu_probe_info *probe_table) { - const struct of_device_id *of_id; + const struct of_device_id *of_id = NULL; armpmu_init_fn init_fn; struct device_node *node = pdev->dev.of_node; struct arm_pmu *pmu; @@ -207,11 +207,13 @@ int arm_pmu_device_probe(struct platform_device *pdev, if (ret) goto out_free; - if (node && (of_id = of_match_node(of_table, pdev->dev.of_node))) { + if (node) + of_id = of_match_node(of_table, node); + + if (of_id) { init_fn = of_id->data; - pmu->secure_access = of_property_read_bool(pdev->dev.of_node, - "secure-reg-access"); + pmu->secure_access = of_property_read_bool(node, "secure-reg-access"); /* arm64 systems boot only as non-secure */ if (IS_ENABLED(CONFIG_ARM64) && pmu->secure_access) { -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel