Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1633599imj; Thu, 14 Feb 2019 09:28:32 -0800 (PST) X-Google-Smtp-Source: AHgI3Iadz3FIwYZ3N2QiVnHZQn6KCxsUhCoeFD9hcO5g6XJOsU8uqH1tSMl4ZBhvdC9kUO46QI/Y X-Received: by 2002:a63:580f:: with SMTP id m15mr935586pgb.342.1550165312316; Thu, 14 Feb 2019 09:28:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550165312; cv=none; d=google.com; s=arc-20160816; b=fwL3zBh/WRsTV8zsuWnrdhfj20y5/ndUNUg8U93dxuXmGzlKFXedzojPubM9LSCBhe 5A7Dc7/Mf6SD4vKhI3iLemsFQ1FGpYY3fpHUmE+FlsOiWlUBUve8vFLjJF11E+MNyyR+ OlxLVFITo8y7TYpkhiCtJOvhVESNMGYs2nxzbXG+5bNDrbbxh0hFP29vXU5gLTZMZMt7 sinNhLM1TH3KE4ceaB9n9q+0w5fuE1/jvxcNF34GwGgtsNeh/NDLSBL2sCq+I/XOHkeh 178rGAYu0dDBF2aiztdBK7zyXQQ+rWPbt0TyuJ08/Vq62yj+TZYWH9sj0xP/dNbO3VqF /WpA== 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=p6EjRyjzCVhmP7D0CDHx/Vx1zJNTj5zJ7GluwlWDD9I=; b=urp0oA1hlRk9FwfbQgpMEPFcfVfcBTO5nPC9c+0WkuSr691fil++OxGn80VCWtCZrg e/516Dtjj+2OkSC33dLp6+TZmINhuggZFqYIM1253fdU6jBsCvYH8J6hYuLLyLqNEn5I TC1PoppYDx81TRyr1Es2aaeWR58iv9SWnJgksPlCgfgTIuTZmGtqMwDD4jPbp53jWRrX Y9Li0/KR+8Eh2Iog/MqVjV544d4Yrs5p5jyaGqxiVm63gH+dPOKNPwdXVcghG8cS40H6 RiOAnESx70O1/J92oZjAdwaxyG6fQ5o+bQTSKDUyWpA8vBgTNlb3vYBWgs4/arooxypL U9qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=05Ox1cPe; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si2795811pgk.291.2019.02.14.09.28.16; Thu, 14 Feb 2019 09:28:32 -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=05Ox1cPe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389978AbfBNJlK (ORCPT + 99 others); Thu, 14 Feb 2019 04:41:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:60466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730685AbfBNJlJ (ORCPT ); Thu, 14 Feb 2019 04:41:09 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 7670C2229F; Thu, 14 Feb 2019 09:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550137268; bh=FPx3PBkPN3ty3Ia6Iq7gPktSnoMRP+VuMlw+4HT+a2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=05Ox1cPe31QcBsKPnljDfvfZrWoGPEx4C9r1S08Y2HWAhr8isAL2QI47VnmDUtaMp exi6RzXiPzN+z1x7y6ogthXeZzXDr+1a/MtNUB5wCLVhSM3Ck5KEA+qA8orb2TQLvs yHt8cxJYIkdriFpT8QIsmkCYMhV1XjxhSZLv5jQ0= Date: Thu, 14 Feb 2019 10:41:06 +0100 From: Greg KH To: Vaishali Thakkar Cc: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org, bjorn.andersson@linaro.org, vkoul@kernel.org Subject: Re: [PATCH 3/5] soc: qcom: socinfo: Expose custom attributes Message-ID: <20190214094106.GA10895@kroah.com> References: <297ee5e7840077f0330d4ae02dcd13c2ad97f910.1550114271.git.vaishali.thakkar@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <297ee5e7840077f0330d4ae02dcd13c2ad97f910.1550114271.git.vaishali.thakkar@linaro.org> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 14, 2019 at 09:11:49AM +0530, Vaishali Thakkar wrote: > +static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo) > +{ > + qcom_socinfo->dbg_root = debugfs_create_dir("qcom_socinfo", NULL); > + > + if (!qcom_socinfo->dbg_root) { > + pr_err("Cannot create debugfs directory\n"); > + return; > + } No need to check this at all, just call debugfs_create_dir() and be done with it. > + > + DEBUGFS_UINT_ADD(raw_version); > + DEBUGFS_UINT_ADD(hardware_platform); > + DEBUGFS_UINT_ADD(platform_version); > + DEBUGFS_UINT_ADD(foundry_id); > + DEBUGFS_HEX_ADD(chip_family); > + DEBUGFS_HEX_ADD(raw_device_family); > + DEBUGFS_HEX_ADD(raw_device_number); > + DEBUGFS_ADD(build_id); > + DEBUGFS_ADD(accessory_chip); > + DEBUGFS_ADD(pmic_model); > + DEBUGFS_ADD(platform_subtype); > + DEBUGFS_ADD(pmic_die_revision); > +} > + > +static void socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo) > +{ > + debugfs_remove_recursive(qcom_socinfo->dbg_root); > +} > +#else > +socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo) { return 0; } > +socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo) { return 0; } These function signatures do not match the ones above :( thanks, greg k-h