From patchwork Wed Sep 12 03:40:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhong jiang X-Patchwork-Id: 10596709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44E816CB for ; Wed, 12 Sep 2018 03:53:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E02D5299C4 for ; Wed, 12 Sep 2018 03:53:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFD8B299E2; Wed, 12 Sep 2018 03:53:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 66643299C4 for ; Wed, 12 Sep 2018 03:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+ntAHF5YSPXShN/SYztSYnGILxeoA9ukjWkkUwj8wRE=; b=fBpDgLj52+E78J 0Mku+jgS+X+s2aw8EijYYdxzcwhpj6X+RV2EQ1qPhxSktsRHsymms6s2H+zHfV/15o7GYEH/cCAAO twanqQ3jIwEwtni+WzxZgLUq7kdn/j16pcqSX+3JgKxLpVoiKXNZSkUidOJ7L9uc5FOKbainDs8rK l/Q3AlA6SR1y8z+KmOogKSlx1mbO+mhkA+eHYZ/e6FwQZor0OifueZig+4joc7OZD7r5MlvWwSvk1 6jGv47CFQ76KHrCWGy8fYeKjg4m+frx+YMHBQwWK0hhpSmDKCrfLS+KCKlEYz8KzOVLNPDeHgmK8A bc7nRp2osg9qa3THgIjQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzwDF-0005rt-1Y; Wed, 12 Sep 2018 03:53:09 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzwDB-0005qJ-V0 for linux-arm-kernel@lists.infradead.org; Wed, 12 Sep 2018 03:53:07 +0000 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 783753DBC983B; Wed, 12 Sep 2018 11:52:45 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.399.0; Wed, 12 Sep 2018 11:52:43 +0800 From: zhong jiang To: , , , , , Subject: [PATCH] staging: remove unneeded static set .owner field in platform_driver Date: Wed, 12 Sep 2018 11:40:28 +0800 Message-ID: <1536723628-50914-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180911_205306_169744_66FF6C38 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP platform_driver_register will set the .owner field. So it is safe to remove the redundant assignment. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang Acked-by: Vaibhav Agarwal --- drivers/staging/greybus/audio_codec.c | 1 - drivers/staging/mt7621-eth/gsw_mt7621.c | 1 - drivers/staging/mt7621-eth/mtk_eth_soc.c | 1 - 3 files changed, 3 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 35acd55..08746c8 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -1087,7 +1087,6 @@ static int gbaudio_codec_remove(struct platform_device *pdev) static struct platform_driver gbaudio_codec_driver = { .driver = { .name = "apb-dummy-codec", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &gbaudio_codec_pm_ops, #endif diff --git a/drivers/staging/mt7621-eth/gsw_mt7621.c b/drivers/staging/mt7621-eth/gsw_mt7621.c index 2c07b55..53767b1 100644 --- a/drivers/staging/mt7621-eth/gsw_mt7621.c +++ b/drivers/staging/mt7621-eth/gsw_mt7621.c @@ -286,7 +286,6 @@ static int mt7621_gsw_remove(struct platform_device *pdev) .remove = mt7621_gsw_remove, .driver = { .name = "mt7621-gsw", - .owner = THIS_MODULE, .of_match_table = mediatek_gsw_match, }, }; diff --git a/drivers/staging/mt7621-eth/mtk_eth_soc.c b/drivers/staging/mt7621-eth/mtk_eth_soc.c index 7135075..363d3c9 100644 --- a/drivers/staging/mt7621-eth/mtk_eth_soc.c +++ b/drivers/staging/mt7621-eth/mtk_eth_soc.c @@ -2167,7 +2167,6 @@ static int mtk_remove(struct platform_device *pdev) .remove = mtk_remove, .driver = { .name = "mtk_soc_eth", - .owner = THIS_MODULE, .of_match_table = of_mtk_match, }, };