From patchwork Mon Nov 11 22:37:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11237971 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB32B13BD for ; Mon, 11 Nov 2019 22:37:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BECA0206A3 for ; Mon, 11 Nov 2019 22:37:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mAtFUg2a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BECA0206A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=Q+D5nxIBxeZ1bHrs/XM6L1KP5hv2ZizT3pw1Rfib6oQ=; b=mAtFUg2a0OkftF cxYZKbxLuvFzNKfrhuNx7enh5gDUAPLxNVR9sXMIdCYoBXUErEGLwWYqmVdpS8Zo/IBk8vls1sJNz 8KKPNCUlqbL+oPHGQEF1VT7onvLVYdgLiatf2fmBChaj+83/cQ0t2Oq+y6bJmpQ4QWA/4vq78jd8z GgE+yMw91PrqfMdmHBkn2CYQMfCdIkbtZItYX7GOPWdflzrf1rbsFSk2KOd9fq1OB6SPD8HnzNT9V 9IqweFah402eQF7traMaTzanmndWLwdanXscUTnkl5OoaBDv8lBQCCgi1duxOBMZebtER3KsAUBOK G4/wWdSoPiMiU7sIsKgg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUIJY-0005f5-1I; Mon, 11 Nov 2019 22:37:40 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUIJO-0005YK-8x for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2019 22:37:38 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AAEA9AC8B; Mon, 11 Nov 2019 22:37:28 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: Hartley Sweeten , Alexander Sverdlin Subject: [PATCH] ARM: ep93xx: Avoid soc_device_to_device() Date: Mon, 11 Nov 2019 23:37:22 +0100 Message-Id: <20191111223722.2364-1-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_143730_466872_8B907441 X-CRM114-Status: GOOD ( 12.36 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Andreas_F=C3=A4rber?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org ep93xx_init_soc() uses soc_device_to_device() to return a device to ep93xx_init_devices(), where it is passed on to its callers, who all ignore the return value. As this helper is deprecated, change the return type of ep93xx_init_devices() to void and have ep93xx_init_soc() return the soc_device instead. Cc: Greg Kroah-Hartman Signed-off-by: Andreas Färber Acked-by: Alexander Sverdlin Reviewed-by: Greg Kroah-Hartman --- arch/arm/mach-ep93xx/core.c | 12 ++++-------- arch/arm/mach-ep93xx/platform.h | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 6fb19a393fd2..7a0c82b30564 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -937,7 +937,7 @@ static const char __init *ep93xx_get_machine_name(void) return kasprintf(GFP_KERNEL,"%s", machine_desc->name); } -static struct device __init *ep93xx_init_soc(void) +static struct soc_device __init *ep93xx_init_soc(void) { struct soc_device_attribute *soc_dev_attr; struct soc_device *soc_dev; @@ -958,13 +958,11 @@ static struct device __init *ep93xx_init_soc(void) return NULL; } - return soc_device_to_device(soc_dev); + return soc_dev; } -struct device __init *ep93xx_init_devices(void) +void __init ep93xx_init_devices(void) { - struct device *parent; - /* Disallow access to MaverickCrunch initially */ ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA); @@ -975,7 +973,7 @@ struct device __init *ep93xx_init_devices(void) EP93XX_SYSCON_DEVCFG_GONIDE | EP93XX_SYSCON_DEVCFG_HONIDE); - parent = ep93xx_init_soc(); + ep93xx_init_soc(); /* Get the GPIO working early, other devices need it */ platform_device_register(&ep93xx_gpio_device); @@ -989,8 +987,6 @@ struct device __init *ep93xx_init_devices(void) platform_device_register(&ep93xx_wdt_device); gpio_led_register_device(-1, &ep93xx_led_data); - - return parent; } void ep93xx_restart(enum reboot_mode mode, const char *cmd) diff --git a/arch/arm/mach-ep93xx/platform.h b/arch/arm/mach-ep93xx/platform.h index b4045a186239..8a3a2be50f11 100644 --- a/arch/arm/mach-ep93xx/platform.h +++ b/arch/arm/mach-ep93xx/platform.h @@ -34,7 +34,7 @@ void ep93xx_register_ac97(void); void ep93xx_register_ide(void); void ep93xx_register_adc(void); -struct device *ep93xx_init_devices(void); +void ep93xx_init_devices(void); extern void ep93xx_timer_init(void); void ep93xx_restart(enum reboot_mode, const char *);