Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp476646yba; Wed, 15 May 2019 04:50:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+Cx12WBaPnIv+fNfWV3G+qEawknsl+U6WDGnZwSsBfTz3MwDIXbYfaQPmDPjbrewq/o2l X-Received: by 2002:a17:902:4827:: with SMTP id s36mr20454824pld.197.1557921000268; Wed, 15 May 2019 04:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557921000; cv=none; d=google.com; s=arc-20160816; b=t9YFyhFfwK2dPGuIVumAaZ0Cmc6xRYH2yBl5QZdZl8h6oFt5uUqoto53931odrsOhl GRY4jTIuOVpLvNTbngBQWRFsrS5gXgX+YNCNduM1iO/Eo+7xgYSnzgCOnR4O2z1Zyc4F sejA0PpWcOQS6vLsdIhGdocvOO9tG8AA6QJw8eMGYKPglizmYcmebleLdF/Np6H/ouCI Mq/uYgf6BjueyShb6Nw3ndRqHDIZRBPbqjhWc0mL8IFvMtePwh+uHPoJwD1rj3Effyun 1y12nZVfbkrhZ4uLep2+QcK5R1KPRkXaHQBgBEaQuh46zoLPy6BsUZR4que/IxiSsKV+ 44UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UybbNuVimaoZe/obsoU7tb4m5ZUy6LvzQm9jzE+0RrA=; b=mDJeosAEY+ABHmppFX5pZc+mhfS5Xalx8oJqpzeYwAHPx3Zt9iFLIfjewAEqm6Mb+R 5oOFzG97AbgfLO9C94Wdc+0nB/rUSvDSZvtnk+In4nFQeN3ZvQMPIvZsSnrSdk91JNbD SDlU3cUsEvHnnyH7fI+Kry2FEMLZPxZ2IAVUdd2V+38uKYsZ8OxvnORmVKH8312l6NBF QSNI6rtY6rfd7e8e6OMnHqdcQZcbBYY1KN6OUulm0AXDPQ3F/FnWJchKWyBSwKvPKjIu IFHxwRL2452TlECf4OtTay8AH8KP4s/5iIpqEM7PRMrn7rDMj/2z0ak8+047DIBIMmFz J8aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P3zOusdb; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si1641159plb.11.2019.05.15.04.49.45; Wed, 15 May 2019 04:50:00 -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=@gmail.com header.s=20161025 header.b=P3zOusdb; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732106AbfEOLrf (ORCPT + 99 others); Wed, 15 May 2019 07:47:35 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:46054 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732132AbfEOLrb (ORCPT ); Wed, 15 May 2019 07:47:31 -0400 Received: by mail-ed1-f67.google.com with SMTP id g57so3635412edc.12 for ; Wed, 15 May 2019 04:47:30 -0700 (PDT) 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=UybbNuVimaoZe/obsoU7tb4m5ZUy6LvzQm9jzE+0RrA=; b=P3zOusdb1eGvSqR4PHA6LNUt17i57cozISGL1Z2ZbAkKaLsynOH1YiRqPEmYHygXes Hoa8kM/IxL3+ytbz2M0n7R9YbChiOVSJCp3VZ6Gf8HDYfa//Mp6Znqahdoc4KmJ2Vyem Bsr0HxWRZKVkRvadCyEoeC9SrEmqJ3WTJdyxvLr07Gf5+OfWZrc4EJ6fti3irFy78AyJ 46eUcKL0bU7ZNnHqaZTw9zVlBkYTTlJ41VvvXTuzFQbAIYt30iDeB4wpgkBE2gspCAcA YrAmUx1dZsiJeL4mYNHQGjKmcyOsMb8RlwYN2r9g41m5PLXGQaiAcmK0BPS3UcOGgSVd oheA== 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=UybbNuVimaoZe/obsoU7tb4m5ZUy6LvzQm9jzE+0RrA=; b=gnDFOXz/mvNBbl8OfPdvquJSnB8VIu9PJXeMwf0xiWqMe78P83jpnZRWSeGYSMPM+/ 3Gu5arif5e1jNTmA8hRKEB9eWAoh0As0ZKfVh2MDyTd9Cswtp/y6w/3KXBxPf7eve+68 DsCNmGzp+QTQ0+QHaU5cudv7bHLMZRCNnhSq4B1THbIyRcth11RNqXStjB742PC3i9Td F0AJdvb+Xf2uu+YnAaR50/YnB8ES4yvN0qeH3Pf7M8ysmEkWnBmzv/CsGYV2F/BNuUhW CgRClBykKydc4jXMG/54kjGOZqebjaqVPzzl5vnWMWGT8ADKKVh3EpKTXAeZa7ehs/G5 2ypw== X-Gm-Message-State: APjAAAVzOIFE98vyVWt82M52shoFrFu0fy0udq4K2q5nNjY1lulvw8Kr UL0nV2z9SZ9TSgz28C8ZY3EgiDbufmf5uwlf+7s= X-Received: by 2002:a50:9441:: with SMTP id q1mr42373727eda.101.1557920849482; Wed, 15 May 2019 04:47:29 -0700 (PDT) MIME-Version: 1.0 References: <1557908823-11349-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1557908823-11349-1-git-send-email-Anson.Huang@nxp.com> From: Daniel Baluta Date: Wed, 15 May 2019 14:47:18 +0300 Message-ID: Subject: Re: [PATCH V2 1/2] soc: imx: Add SCU SoC info driver support To: Anson Huang Cc: "catalin.marinas@arm.com" , "will.deacon@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "agross@kernel.org" , "maxime.ripard@bootlin.com" , "olof@lixom.net" , "horms+renesas@verge.net.au" , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , Leonard Crestez , "marc.w.gonzalez@free.fr" , "dinguyen@kernel.org" , "enric.balletbo@collabora.com" , "l.stach@pengutronix.de" , Abel Vesa , "robh@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anson, Since you are going to send a new version for this please consider my comment inline. > +static u32 imx8qxp_soc_revision(void) > +{ > + struct imx_sc_msg_misc_get_soc_id msg; > + struct imx_sc_rpc_msg *hdr = &msg.hdr; > + u32 rev = 0; No need to initialize this here. > + int ret; > + > + hdr->ver = IMX_SC_RPC_VERSION; > + hdr->svc = IMX_SC_RPC_SVC_MISC; > + hdr->func = IMX_SC_MISC_FUNC_GET_CONTROL; > + hdr->size = 3; > + > + msg.data.send.control = IMX_SC_C_ID; > + msg.data.send.resource = IMX_SC_R_SYSTEM; > + > + ret = imx_scu_call_rpc(soc_ipc_handle, &msg, true); > + if (ret) { > + dev_err(&imx_scu_soc_pdev->dev, > + "get soc info failed, ret %d\n", ret); > + /* return 0 means getting revision failed */ Just return 0 here. No need for rev. > + return rev; > + } > +