Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4969160pxu; Tue, 22 Dec 2020 05:28:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+DPxvmOc92W95NvmM0vi4Kj05xflyMgVQrt6/wkm+oFDGjqzf8OYw/BM59+1lNyf7dEJP X-Received: by 2002:a17:906:339a:: with SMTP id v26mr19469699eja.107.1608643737779; Tue, 22 Dec 2020 05:28:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608643737; cv=none; d=google.com; s=arc-20160816; b=FVWNOp1wysC0iW8y/8BN7CHY/IhkbCyLo6Jgu6RKkiAbfN8gl+T3SEFyweAL/FL7CC pdFGwkcU1j3S4FSG3EQ78dkEGeVfdy+jtuVlt3gZVrJFUQl/JXmmxjyxyBjK9O21NXf7 Bvi9mRoFkCbjf9OEptgPGJdFuWBNyH25KEmi97KgPshcJ2vpxyXPOq0kopL18Im6Zks9 cPAkjIG4PtyyAjs6cSVT/zXf8B3OCAz8IonLrCQgckEWSz+nz1s+lh7Y8m7o17wLpBib /1rcVC43tpgWnTu3hz7qUwynK13rQJr/XE15vwk3Ulu2Ly13CaZTP9rOXrEOF0DWfM2u mhFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SCkfsLtgF20+UjWXYeRABeA5CudYBgLQkf9EDb+O2tU=; b=NsWKiYZQ9wqPcCz9jFaRN7omsQ2Y14cv36UpiyRONo6ua3JRlgxxFqumvbqvn0livY fwEe7zlhne9OjfZ/+VT3OQDKksWX4FXFIhPO+sROvqcWJgdsuTAhOTs+pOr+/CGkIdjB TeAaiL4s99amj+bFHuMB1z+1bIZcdECAOz+sV3eTwshIs0X3WWk2sYN+lz5gL9watmk9 8VsXbwExyiTnbJ+DCydiw3/R2hoBRZTeUrty84+xYmR21xjrE7FKvJfOgvHjtC2aHsfG QedwnRtd5VfeN7dmNbX4YMDEgP/jk3drDkDrWhHocc5IWXujB/snnLrJz7II5N/vgAKX u8Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Omjr5BH1; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs23si10711389ejc.239.2020.12.22.05.28.34; Tue, 22 Dec 2020 05:28:57 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=Omjr5BH1; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727050AbgLVN00 (ORCPT + 99 others); Tue, 22 Dec 2020 08:26:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727040AbgLVN0Z (ORCPT ); Tue, 22 Dec 2020 08:26:25 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F1CBC0613D3; Tue, 22 Dec 2020 05:25:45 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id x20so31860268lfe.12; Tue, 22 Dec 2020 05:25:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SCkfsLtgF20+UjWXYeRABeA5CudYBgLQkf9EDb+O2tU=; b=Omjr5BH1sBV2wzA9JhFuTPsUkfIbgz+KDCeYKpEodOcWiXQa4hF5Le244PFScYpnsH 6IVR6fVAHtFoDCHDlFMGsILHjTh3PzBUwvw5Oxw3MByJpNVdVVt3VVzolPXO+kmGeges LJ+BA3twF6yNuCVvdTSypNZlyQe7jf6xcbO5bMjkPTuJpvp2q+9AcP5iFczo2CChHg78 09ITbKxdouXyzZ96L69KgyLr2yXUpoP9vdZ6e8scmIZJMjaZwnnJr3sZCToiOBrp99Mo WDx3d0l+D9l/5ya0QjZjQoVw/WefnSKnlsoWQBh3icw9yiHlYhxuzWOBzDiKoSVPjSi+ cvHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SCkfsLtgF20+UjWXYeRABeA5CudYBgLQkf9EDb+O2tU=; b=hXsupSoS7kuRE33RnZUT/+S8T9e+xnmzyHEoAi5wZNN4K20eF4aQERCoMPcx8S99wJ Lz8dwDus0D6g8HcG9a3v0j7rxvJ6mfdpLFRX2dcCDgxtfu2jtk+73SEKut/xyg+x6g/w CjKbsWAk/lls9YZWcC//G+/tDRMlooV7WS62n/m0RCIZBocZTHvdAOijkZt8L9Ck0Q17 ePCAbIj28sFl/dJP2XYJvccEDxAk8gUh4CyGZcwgsUTBTGbm9P6kHxIci9EVOeUAHtBt f11VZZ3zhZBYIShyFflqBaVkeoFLsI9KJ3WDn9bw8uYzOQ3mtH7G1kCHjQdJ1dwREHGi Gqkg== X-Gm-Message-State: AOAM533CeuOp6Nfzseg3bZrU70o/5JNfxTmsrhFeZ5e9FWLd+VHAnDtO YOVpxnpumoWn9gdF4p/8OL+rvDjGhLZYy7Pc2xs= X-Received: by 2002:a05:6512:1102:: with SMTP id l2mr8472685lfg.500.1608643543723; Tue, 22 Dec 2020 05:25:43 -0800 (PST) MIME-Version: 1.0 References: <20201222081057.26401-1-alice.guo@oss.nxp.com> <20201222081057.26401-4-alice.guo@oss.nxp.com> In-Reply-To: <20201222081057.26401-4-alice.guo@oss.nxp.com> From: Fabio Estevam Date: Tue, 22 Dec 2020 10:25:32 -0300 Message-ID: Subject: Re: [PATCH v9 4/4] soc: imx8m: change to use platform driver To: "Alice Guo (OSS)" Cc: Rob Herring , Shawn Guo , Sascha Hauer , Sascha Hauer , Krzysztof Kozlowski , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel , NXP Linux Team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alice, On Tue, Dec 22, 2020 at 5:11 AM Alice Guo (OSS) wrote: > - soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH); > - soc_uid <<= 32; > - soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW); > + if (dev) { > + int ret = 0; No need to initialize ret to 0. > - imx8mm_soc_uid(); > + if (dev) { > + int ret = 0; Ditto. > +/* Retain device_initcall is for backward compatibility with DTS. */ > +static int __init imx8_soc_init(void) > +{ > + int ret = 0; Ditto. > + > + if (of_find_matching_node_and_match(NULL, imx8_soc_match, NULL)) > + return 0; > + > + ret = imx8_soc_info(NULL); > + return ret; Or you could even get rid of 'ret' and return imx8_soc_info() directly.