From patchwork Fri Aug 18 14:58:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 110402 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp935461obb; Fri, 18 Aug 2017 07:59:07 -0700 (PDT) X-Received: by 10.99.67.194 with SMTP id q185mr5886612pga.77.1503068347416; Fri, 18 Aug 2017 07:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503068347; cv=none; d=google.com; s=arc-20160816; b=bgI0m8oV6okdGGGbKfbU9GQpJCyvjd18hm3NBaQqRLAUSpExnzybj52epIBcKJy8aI U1GadjWTmMF3XEvcWfkdMpnNgfxCeF4zvzgiVqJrOvmore3P2XF3G9XdmkVpEXaAM6Jn L1HOh+CoTctGFMHSuS+2RsC6ByPpIlKQON3WifYlX+5O8EzCHxiUiuQzdmuzeps1O1Le tZLe/5SiRygT5aeznEcsQ2PWtc7Hj43xdF2pasWVTgzzCJOkzS5Rb3RoIRhe+TTfxuPW VbZxkPu39cuqu7mMsFZ0JAXWgmi7/4pnZ6NHOmQ2WRQV6Z50uatPO1PDRRpkfzVeeha7 EGAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Qb/+YdlUn8a2xOpagopMtreZgTRViMiIacc5Sj31gjM=; b=rkHeYx8ty00m0l8uMi84cpmFTxtvDaZsdYASdck348ibWG4r+B3O+AdN0mQBicwQO5 sB1BYrxiTPBdoi+IYdDQncZ7e4cct3vIWpZcH5svwQbTb0cqXinarIH20gqDS2opK5bb 3Tsbih/gILy8SW7u3dam0fggsQtXne+YZPgADyvmfAOK0erYUCCpuKKswwSJ0gzzjnXu EzOlpeVD834jU0uE93I2riqJzhI9B+7oilMyXlSf5lhKq8tLmqqahiB/VeofDr4BvZfG MWoZFt0KIsgFQpCmb1Fxt1gboaO4L2yd4Ztn6NzjjvCC1mKW28wrEy+cdwA8yWmfGfdk 9x+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x+rr/Dzi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q20si3741542pfa.458.2017.08.18.07.59.07; Fri, 18 Aug 2017 07:59:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x+rr/Dzi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752517AbdHRO7E (ORCPT + 26 others); Fri, 18 Aug 2017 10:59:04 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:25722 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbdHRO7A (ORCPT ); Fri, 18 Aug 2017 10:59:00 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7IEwoVL013926; Fri, 18 Aug 2017 09:58:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1503068330; bh=cMrrph7sbGy5d3xe+WD7NVUrGgvDor29aUvPvrSODJE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=x+rr/DzibISZSgiGzjVCVKrnd0jmTeT6bcAGPNKL1VTk5uP9hBpBXD1prxobO2me7 fs6EUvQ/bsehXv4lg9kCUIw3sVHzKkW/SOZliVJ/7jAWWRWg+k0WkesgMWiZ60N5Fy VIOQFhSQqwawjMx4AuBA5is4tRrycGZtOa/2pBhU= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7IEwoaP012284; Fri, 18 Aug 2017 09:58:50 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 18 Aug 2017 09:58:49 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 18 Aug 2017 09:58:49 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Fri, 18 Aug 2017 09:58:49 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7IEwKk7023721; Fri, 18 Aug 2017 09:58:46 -0500 From: Kishon Vijay Abraham I To: Bjorn Helgaas CC: Joao Pinto , Arnd Bergmann , , , , , , , Shawn Lin Subject: [PATCH 09/18] PCI: endpoint: functions/pci-epf-test: Remove the ->remove() callback Date: Fri, 18 Aug 2017 20:28:01 +0530 Message-ID: <20170818145810.17649-10-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818145810.17649-1-kishon@ti.com> References: <20170818145810.17649-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shawn Lin epf_test is allocated using devm_kzalloc. Hence it's not required to explicitly free it in remove() callback. Since ->remove() callback doesn't do anything other than freeing epf_test, remove the ->remove() callback. Signed-off-by: Shawn Lin Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/endpoint/functions/pci-epf-test.c | 9 --------- 1 file changed, 9 deletions(-) -- 2.11.0 diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index a0aea2500690..4ddc6e8f9fe7 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -496,14 +496,6 @@ static int pci_epf_test_probe(struct pci_epf *epf) return 0; } -static int pci_epf_test_remove(struct pci_epf *epf) -{ - struct pci_epf_test *epf_test = epf_get_drvdata(epf); - - kfree(epf_test); - return 0; -} - static struct pci_epf_ops ops = { .unbind = pci_epf_test_unbind, .bind = pci_epf_test_bind, @@ -513,7 +505,6 @@ static struct pci_epf_ops ops = { static struct pci_epf_driver test_driver = { .driver.name = "pci_epf_test", .probe = pci_epf_test_probe, - .remove = pci_epf_test_remove, .id_table = pci_epf_test_ids, .ops = &ops, .owner = THIS_MODULE,