From patchwork Tue May 11 12:27:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Fang X-Patchwork-Id: 12250917 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 02BE9C433B4 for ; Tue, 11 May 2021 13:25:31 +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 B0BC461288 for ; Tue, 11 May 2021 13:25:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0BC461288 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=vL9PrLze15loTsyWEVT3/je8ppmIZ0uBWBAJLFAI7+U=; b=BJJm1fBvSyM7m3BmmB4Iyrp3C yJuK0bwuXj6JBaqaGr0PnRrLCiCVkvllL4YUGzxNDF2cpZbNbj6wMdieGTcOwpr5156UseWULNltA NelmS5v2fg3Uy1vZafe2DxN5EFIqOsHxQ//TLGbgGQQi/KBj9xvPF+hqMZuoi9cAhGVwn9sywR7wj NRdO78pGKxg4kd5/MMjkPVJTjNoB8zRDroLHqgwwY4Ea7/rJIzpIhdgXyY0+oZco5WEyVN9Q1DcKB RLub0egcNqIjngsI/+B4n6HE+uqgJT35YZdWZ6k5eaTdprbcM96f9PhXRieQtTsejrc7gUAlufcTY kHsewub5Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgSMN-000570-MW; Tue, 11 May 2021 13:23:39 +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 1lgRUP-00HNy0-Mk for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 12:27:53 +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=jd6hHohT6CsD+7Ijbmx7ILfJXasQZpBRo9udu+Xk4yc=; b=Rw6mwDNDKs3AFjLCwUBylYCSWx Sa3Tgh9vJAfnTSHTNsbtwqEOce9akv8N5YLdC1WNxXqTUSp/eWZMPAkyUmOb5jnQkGh1XywBDxMHp Aee6Xs6exe1VG5PU70vnNpOTJq+X1x1WnU38AuDCD0v6isaFoa6jMrKltuf/QlpvMO2GrVC4KKMFm A9B7YhSy8JMyOaLFsurfem9tVf4nvjxpfCl1x74NZOIQfVhRGU7e8eyYMPBPTvIF0+9TcABENMl7B lzK4mXvk0/8Xkrpmocoi3lopJ6gHJjH4KbHONiVsIt7Y4Pqa0UW+CRYx0qsnGK5A6gmCHE3Lh6/O5 Qo1uKEVg==; Received: from szxga04-in.huawei.com ([45.249.212.190]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgRUM-009ZEx-Vm for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 12:27:52 +0000 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FfcYL5R8VzmgHV; Tue, 11 May 2021 20:24:22 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 20:27:35 +0800 From: Jay Fang To: , CC: , , , Subject: [PATCH 1/4] drivers/perf: arm_spe_pmu: Fix some coding style issues Date: Tue, 11 May 2021 20:27:31 +0800 Message-ID: <1620736054-58412-2-git-send-email-f.fangjian@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1620736054-58412-1-git-send-email-f.fangjian@huawei.com> References: <1620736054-58412-1-git-send-email-f.fangjian@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-20210511_052751_210540_FC2F0BAE X-CRM114-Status: GOOD ( 10.24 ) 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 Fix some coding style issues reported by checkpatch.pl, including following types: WARNING: void function return statements are not generally useful WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Junhao He Signed-off-by: Jay Fang --- drivers/perf/arm_spe_pmu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 8a1e86a..e3711cb 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -1044,7 +1044,6 @@ static void __arm_spe_pmu_dev_probe(void *info) spe_pmu->max_record_sz, spe_pmu->align, spe_pmu->features); spe_pmu->features |= SPE_PMU_FEAT_DEV_PROBED; - return; } static void __arm_spe_pmu_reset_local(void) @@ -1190,10 +1189,8 @@ static int arm_spe_pmu_device_probe(struct platform_device *pdev) } spe_pmu = devm_kzalloc(dev, sizeof(*spe_pmu), GFP_KERNEL); - if (!spe_pmu) { - dev_err(dev, "failed to allocate spe_pmu\n"); + if (!spe_pmu) return -ENOMEM; - } spe_pmu->handle = alloc_percpu(typeof(*spe_pmu->handle)); if (!spe_pmu->handle)