Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6995imb; Thu, 28 Feb 2019 14:14:39 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia26fFSKhyxTkf7BZkWYgq5txFULUsRc/wZUD0CkwohzYRBHm+9TWZ/xbWStFREfTqPM+gG X-Received: by 2002:a62:e082:: with SMTP id d2mr2009885pfm.240.1551392079048; Thu, 28 Feb 2019 14:14:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551392079; cv=none; d=google.com; s=arc-20160816; b=XVFUc4cHEdCR7YTsJ33liF3rxCH+Oj+c1XIyHYCG458rQqX9dthUVr68jzzA+UMS24 O+S0Ns3Bs7ROJflQyBPD6p3ipswOgoV4i19d9tzSrFmkWEJpglSsP3uuSmsDC4NczPI0 WmvFo5YkBba2ADcopbwCiOMhqBkcZFkxt4w+q9OnvH11Xy2W0Jn/Iyxzji3DD+G1p05v PeWaZsbJbN6q69YjizYleozoThx0W2Xcd6ia6oO0g7EmOCOGmNPMPxzyqliB/JpMh5ks L56sg03yuPCnGR+mWPbJhA8XdkOcnIbkbcdXN184zWGpxnN/4KFuQqRs/Id9kmIUqHyP 8tFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:user-agent:cc:from:references :message-id:subject:to:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=Dtvg/zn9wcpVBzBs8h/tG6KafLc98FfT1pWu8nkreVw=; b=TQ24s5okZLJ40yE1HaErJAkvpSxTVFL21HzzqG0PwmkZ3Ns6nhClrZ4DjXHNAiyqw8 6KXzzs3nKzlL2zGRgEEqYez3nVcpwxzVjysprqMst7mFY3vbQ38iJUnhSVh61xna4Plo Cc1ZcjtaAxoy0sACfwkHD0ZXHpHOAemfJnUuq8/Zako0aY9f2iZvrWFv4vYxM0d5aAZH PzImgIzwb9zv+aqMYmNVj2HIOtXoPZRJu8M23WYnse2X4LbHH5Wc7M1j9AdYAdNe1whR AzsIh0vDys/y2w7BYyPIt7Y9L78okCyDnjuLoa+r/oXZ9KMcnZJuKUdp9Q/dArEb72QP A0rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="PK/HCWlM"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si18808067pga.127.2019.02.28.14.14.24; Thu, 28 Feb 2019 14:14:39 -0800 (PST) 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=@kernel.org header.s=default header.b="PK/HCWlM"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730126AbfB1VeY (ORCPT + 99 others); Thu, 28 Feb 2019 16:34:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:35052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727775AbfB1VeY (ORCPT ); Thu, 28 Feb 2019 16:34:24 -0500 Received: from localhost (unknown [104.132.0.74]) (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 4AF4C218AE; Thu, 28 Feb 2019 21:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551389663; bh=0OfZ6HPE3TFlBTU+uT/JNv9Pnt8hPT0mIyPf/IdPvbo=; h=In-Reply-To:To:Subject:References:From:Cc:Date:From; b=PK/HCWlMtLi/q4/HQQpvIUKZ3vuReJ94NsJFxRuqeMXJlTnfzlmpS8VAm6aETgewU wkLc6OakEco6aq9dBjQp2DIMvLyt+p8F7dXuCgOH7IzUehdB09E0xWGLPH/GgDoUkA BvBOo8qHFuXRmTdTag/+98uI515LrcTeEaiPRS68= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190225065044.11023-6-vaishali.thakkar@linaro.org> To: Vaishali Thakkar , andy.gross@linaro.org Subject: Re: [PATCH v4 5/5] soc: qcom: socinfo: Expose image information Message-ID: <155138966250.16805.8149986906489473683@swboyd.mtv.corp.google.com> References: <20190225065044.11023-1-vaishali.thakkar@linaro.org> <20190225065044.11023-6-vaishali.thakkar@linaro.org> From: Stephen Boyd Cc: david.brown@linaro.org, gregkh@linuxfoundation.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org, bjorn.andersson@linaro.org, vkoul@kernel.org, Vaishali Thakkar User-Agent: alot/0.8 Date: Thu, 28 Feb 2019 13:34:22 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Vaishali Thakkar (2019-02-24 22:50:44) > + qcom_socinfo->dbg_root); > + > + DEBUGFS_IMAGE_NAME(name, apps, SMEM_IMAGE_TABLE_APPS_INDEX); > + DEBUGFS_IMAGE_VARIANT(variant, apps, SMEM_IMAGE_TABLE_APPS_INDEX); > + DEBUGFS_IMAGE_OEM(oem, apps, SMEM_IMAGE_TABLE_APPS_INDEX); > + > + qcom_socinfo->mpss =3D debugfs_create_dir("mpss", > + qcom_socinfo->dbg_root); > + > + DEBUGFS_IMAGE_NAME(name, mpss, SMEM_IMAGE_TABLE_MPSS_INDEX); > + DEBUGFS_IMAGE_VARIANT(variant, mpss, SMEM_IMAGE_TABLE_MPSS_INDEX); > + DEBUGFS_IMAGE_OEM(oem, mpss, SMEM_IMAGE_TABLE_MPSS_INDEX); > + > + qcom_socinfo->adsp =3D debugfs_create_dir("adsp", > + qcom_socinfo->dbg_root); > + > + DEBUGFS_IMAGE_NAME(name, adsp, SMEM_IMAGE_TABLE_ADSP_INDEX); > + DEBUGFS_IMAGE_VARIANT(variant, adsp, SMEM_IMAGE_TABLE_ADSP_INDEX); > + DEBUGFS_IMAGE_OEM(oem, adsp, SMEM_IMAGE_TABLE_ADSP_INDEX); > + > + qcom_socinfo->cnss =3D debugfs_create_dir("cnss", > + qcom_socinfo->dbg_root); > + > + DEBUGFS_IMAGE_NAME(name, cnss, SMEM_IMAGE_TABLE_CNSS_INDEX); > + DEBUGFS_IMAGE_VARIANT(variant, cnss, SMEM_IMAGE_TABLE_CNSS_INDEX); > + DEBUGFS_IMAGE_OEM(oem, cnss, SMEM_IMAGE_TABLE_CNSS_INDEX); > + > + qcom_socinfo->video =3D debugfs_create_dir("video", > + qcom_socinfo->dbg_root); > + > + DEBUGFS_IMAGE_NAME(name, video, SMEM_IMAGE_TABLE_VIDEO_INDEX); > + DEBUGFS_IMAGE_VARIANT(variant, video, SMEM_IMAGE_TABLE_VIDEO_INDE= X); > + DEBUGFS_IMAGE_OEM(oem, video, SMEM_IMAGE_TABLE_VIDEO_INDEX); Couldn't these four lines be a function itself that takes the name, dbg_root, index, etc and create a directory? Looks like a lot of copy paste right now. > } > =20 > static void socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo) > --=20 > 2.17.1 >=20