Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp114767ybz; Tue, 28 Apr 2020 19:34:18 -0700 (PDT) X-Google-Smtp-Source: APiQypIWGG9V0PUzHXh508452NzPZOLL3vnmds+thBR5sx2WzrPxwwVonBU2IVjA1Td/SZtM86VG X-Received: by 2002:aa7:c497:: with SMTP id m23mr573364edq.155.1588127658821; Tue, 28 Apr 2020 19:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588127658; cv=none; d=google.com; s=arc-20160816; b=AjdkvOLPxPMiJAT9OSsgCB89Ox+uft2FHfOE7Ufe0CQq4nswxw4dhGMVBWkOaKUl/9 fbTBzlCEmx+IqdeVzZnfOvpthmqN2yoXaIbukeDqYKvT1NFQiUNPsjCRDX+5NAP6tQuj NGk+6UJArjLflhgZzyzleIMHonvsss/uVR8FwG8q9BLKH7ua6BzCZHy9XXA4WMGDruwq 4hNI9IX5NTdnRxClnil9wDzMkiUsAsC0YjziiSpXx1QVZ2Niw58nd4l9f2ACPXT4Rp97 MMwGAk7MPuPlACC18yvb5UvP+D2E/QvNnOsxr6Ov5uoSFcdTWu2octj6RwbHik2ewcJo yQNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jFj5kHfO43VcU8Jy9e3kJ4ocs5kOLoVQ9T5g26XYQd8=; b=f/1EntJvqJt3uimEuJLi+tBmi50F5FdLIi6CiVw/r+iobgSvsnZ1y4/41dlEOtyqnC wE4sElqOCNdHm0yH5a/0aeqTzOB/Zimq/3CVH2SElQkODLELjSc08rddonES+rCrT/bV cNYDvifiFDD6o3om88zNrlOuSbo8zYG1l7I6mWHSujC8xblkmWGWlvOy6h1CAmort+hM 5jKdITLeeydMG+z4w0IJuk+3a/XQS8XcitcI4IB8RvkfJHun2jn8QuwD/jUtgYVlhCdh paCyLcfp2zd2exKsTDdwt8xlDkgBLXCrZkNt83vimx8qjJm+oBdAu//YSTMnUVDTBm+p azoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="jCbkO5/i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si2566700edd.15.2020.04.28.19.33.47; Tue, 28 Apr 2020 19:34:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="jCbkO5/i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726544AbgD2CcL (ORCPT + 99 others); Tue, 28 Apr 2020 22:32:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:60274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbgD2CcK (ORCPT ); Tue, 28 Apr 2020 22:32:10 -0400 Received: from dragon (80.251.214.228.16clouds.com [80.251.214.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 12F8620730; Wed, 29 Apr 2020 02:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588127530; bh=W8/EyZPYK/miEiqAgzNxrcEQq3GEA2RTZHOJSMhHw38=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jCbkO5/izw0BXWLaRIUG1HrsPMhgFXEcXH8Pohqne7jNYyiRUTUlVyZlPW3wl+sGv 3xtV0TcqiyNQqsPIm6u433+WVvpUQX6IE4LbkPyaiOe7lvYPVnAEv+FflIFNSQkG7P d6vF5sg58rwM4gPwwwa+RKyDl+82lGfIxXkZnwag= Date: Wed, 29 Apr 2020 10:32:02 +0800 From: Shawn Guo To: peng.fan@nxp.com Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, allison@lohutok.net, info@metux.net, Anson.Huang@nxp.com, leonard.crestez@nxp.com, git@andred.net, abel.vesa@nxp.com, ard.biesheuvel@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V1 2/4] ARM: imx: cpu: drop dead code Message-ID: <20200429023201.GJ32592@dragon> References: <1584004645-26720-1-git-send-email-peng.fan@nxp.com> <1584004645-26720-3-git-send-email-peng.fan@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584004645-26720-3-git-send-email-peng.fan@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 12, 2020 at 05:17:23PM +0800, peng.fan@nxp.com wrote: > From: Peng Fan > > imx_soc_device_init is only called by i.MX6Q/SL/SX/UL/7D/7ULP. > So we could drop the switch case for i.MX1/2/3/5 which are dead code > that never be executed. > > Signed-off-by: Peng Fan > --- > arch/arm/mach-imx/cpu.c | 24 ------------------------ > 1 file changed, 24 deletions(-) > > diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c > index 2df649a84697..0302cb66134b 100644 > --- a/arch/arm/mach-imx/cpu.c > +++ b/arch/arm/mach-imx/cpu.c > @@ -108,30 +108,6 @@ static int __init imx_soc_device_init(void) > goto free_soc; > > switch (__mxc_cpu_type) { > - case MXC_CPU_MX1: > - soc_id = "i.MX1"; > - break; > - case MXC_CPU_MX21: > - soc_id = "i.MX21"; > - break; > - case MXC_CPU_MX25: > - soc_id = "i.MX25"; > - break; > - case MXC_CPU_MX27: > - soc_id = "i.MX27"; > - break; > - case MXC_CPU_MX31: > - soc_id = "i.MX31"; > - break; > - case MXC_CPU_MX35: > - soc_id = "i.MX35"; > - break; > - case MXC_CPU_MX51: > - soc_id = "i.MX51"; > - break; > - case MXC_CPU_MX53: > - soc_id = "i.MX53"; > - break; The code is here to completeness. If it doesn't get in your way, let's just keep it. Shawn > case MXC_CPU_IMX6SL: > ocotp_compat = "fsl,imx6sl-ocotp"; > soc_id = "i.MX6SL"; > -- > 2.16.4 >