From patchwork Thu Sep 22 13:41:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 12985155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BC36DC54EE9 for ; Thu, 22 Sep 2022 13:42:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/d7AvJ6Z0OKhZj8bNo44wVCL+km2mg9vkyHdCMXLQcg=; b=cLEdjoXE+XnlWy D/9pl9tE1O158Z9N3WQS8PrdOvqC5XOfmbg9nehrxFRxjgtf76ebNYgDYzaASTRD4onlJt159E/LD wmUCPpdQISl3HrfIzmg+pbILytBxo0kMLWsaAF+VRbySLZY3M21RpPa41JUQKCk/roGuOl+m7df0S QjT6xh8iYFb/yXXoV5rvSujb51E8hkigyXE62t84kwbWUnGMlIUrx3KOlLFUH4vV/8SRuxBnCSREH UkayPKh1ZapUVJL5RYd1AbdGvXkD0+gT8DoJObEmvf/agPE1Uk1MT1CVAQef/sqpUSIpS4d8goOkN CX2jXhvlpaED6cZno4lQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obMSN-00Fj78-PJ; Thu, 22 Sep 2022 13:41:35 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1obMSK-00Fj5S-Mj for linux-arm-kernel@lists.infradead.org; Thu, 22 Sep 2022 13:41:34 +0000 Received: by mail-ej1-x62f.google.com with SMTP id y3so21186710ejc.1 for ; Thu, 22 Sep 2022 06:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=kkiFbabhnWDjXlR3Ra/6lg/maAZN2Inc6pz2K1Um9MU=; b=FVWRd0B7/vaeL2XkYzeUmFIUdr29k78og9jUYk6PkQUXlagEzDMvVayQGup2uzuTwB AjFsoMeg6Q6nUzs7dA0tgXqedH/FBGmy6LtM3wgqJkTVqQuwYjUwC/d35N4TO9q2/eUF Hbfs9In8CnL9FCLVxGvf0O2Oo7+/IayfYO5X7Ip1sHUdJ2GVtBBYmXr9ljmAP1Xfigtu VA62s5boCBJMN0SRYFmlV1t0plIiEayQhV+Olx09G4KXM7HjntnlpRPaXw0JP14aaWEF TOcHbxMM9rUR9CWFSvsaRuxNACrYdYREhsI3KxWt70zO4pZnk83k5P7IFUs7r+WxltHt SI7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=kkiFbabhnWDjXlR3Ra/6lg/maAZN2Inc6pz2K1Um9MU=; b=8LEUSRClNBU+VEwsXAs3YbBhjMiosuwfZ0OLvvGxzsiXHgeiag+39iA8Y4IXQ72V5q ZieSDDqwdeR/xLMMwn73fAx7PJAQeRweWvIU1KlLo73ar7xxuQ19cYCpGVHLnAGSI1Sc h/lTHv1vnW0yVYU4C/yYywt7LRqigyELprlKBxoLWx1un40frhrUe9n+5Maho3XiirTm qNSww2udoq6reVRkeHDmFiU0/dC3Cg1BLNvVG0w9TfEBI48KesesmppyFOox0XKXAZJC H73Y/4zADl6/P3HrPIgk4DE4JoUKUvPF14WiY+1FFq2VeyDyV6cZhZXxVdNlMIdpTgi8 u9qA== X-Gm-Message-State: ACrzQf0+UuVhgBPSPiXpYMOvjh8zSlR/v8W64AIKB93hJ+2EJJdwIuxJ 9zepuBKweepPXkT6jKQGs65DIT6ouFc= X-Google-Smtp-Source: AMsMyM6/zZCqca17h6YzGU50AXWPKI76tb+YgCcReXZFqD84FKdTdslyl5zvwC4us8O815g8/uE92w== X-Received: by 2002:a17:907:9807:b0:781:feee:f87c with SMTP id ji7-20020a170907980700b00781feeef87cmr2903689ejc.101.1663854089983; Thu, 22 Sep 2022 06:41:29 -0700 (PDT) Received: from localhost (p200300e41f201d00f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f20:1d00:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id l10-20020a1709063d2a00b0073c10031dc9sm2596020ejf.80.2022.09.22.06.41.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 06:41:28 -0700 (PDT) From: Thierry Reding To: Thierry Reding Cc: Jon Hunter , Mikko Perttunen , Timo Alho , Manish Bhardwaj , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] firmware: tegra: bpmp: Prefer u32 over uint32_t Date: Thu, 22 Sep 2022 15:41:23 +0200 Message-Id: <20220922134125.844730-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220922_064132_808338_DB557CEA X-CRM114-Status: GOOD ( 13.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thierry Reding The canonical type for 32-bit unsigned integers in the kernel is u32, so use that instead of uint32_t. Signed-off-by: Thierry Reding --- drivers/firmware/tegra/bpmp-debugfs.c | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c index 0c440afd5224..1a3b88d63f0c 100644 --- a/drivers/firmware/tegra/bpmp-debugfs.c +++ b/drivers/firmware/tegra/bpmp-debugfs.c @@ -48,7 +48,7 @@ static int seqbuf_read(struct seqbuf *seqbuf, void *buf, size_t nbyte) return seqbuf_status(seqbuf); } -static int seqbuf_read_u32(struct seqbuf *seqbuf, uint32_t *v) +static int seqbuf_read_u32(struct seqbuf *seqbuf, u32 *v) { int err; @@ -109,7 +109,7 @@ static const char *get_filename(struct tegra_bpmp *bpmp, } static int mrq_debug_open(struct tegra_bpmp *bpmp, const char *name, - uint32_t *fd, uint32_t *len, bool write) + u32 *fd, u32 *len, bool write) { struct mrq_debug_request req = { .cmd = cpu_to_le32(write ? CMD_DEBUG_OPEN_WO : CMD_DEBUG_OPEN_RO), @@ -147,7 +147,7 @@ static int mrq_debug_open(struct tegra_bpmp *bpmp, const char *name, return 0; } -static int mrq_debug_close(struct tegra_bpmp *bpmp, uint32_t fd) +static int mrq_debug_close(struct tegra_bpmp *bpmp, u32 fd) { struct mrq_debug_request req = { .cmd = cpu_to_le32(CMD_DEBUG_CLOSE), @@ -179,7 +179,7 @@ static int mrq_debug_close(struct tegra_bpmp *bpmp, uint32_t fd) } static int mrq_debug_read(struct tegra_bpmp *bpmp, const char *name, - char *data, size_t sz_data, uint32_t *nbytes) + char *data, size_t sz_data, u32 *nbytes) { struct mrq_debug_request req = { .cmd = cpu_to_le32(CMD_DEBUG_READ), @@ -196,7 +196,7 @@ static int mrq_debug_read(struct tegra_bpmp *bpmp, const char *name, .size = sizeof(resp), }, }; - uint32_t fd = 0, len = 0; + u32 fd = 0, len = 0; int remaining, err; mutex_lock(&bpmp_debug_lock); @@ -259,7 +259,7 @@ static int mrq_debug_write(struct tegra_bpmp *bpmp, const char *name, .size = sizeof(resp), }, }; - uint32_t fd = 0, len = 0; + u32 fd = 0, len = 0; size_t remaining; int err; @@ -322,7 +322,7 @@ static int bpmp_debug_show(struct seq_file *m, void *p) .size = sizeof(resp), }, }; - uint32_t fd = 0, len = 0; + u32 fd = 0, len = 0; int remaining, err; filename = get_filename(bpmp, file, fnamebuf, sizeof(fnamebuf)); @@ -413,8 +413,8 @@ static int bpmp_populate_debugfs_inband(struct tegra_bpmp *bpmp, { const size_t pathlen = SZ_256; const size_t bufsize = SZ_16K; - uint32_t dsize, attrs = 0; struct dentry *dentry; + u32 dsize, attrs = 0; struct seqbuf seqbuf; char *buf, *pathbuf; const char *name; @@ -496,10 +496,10 @@ static int mrq_debugfs_read(struct tegra_bpmp *bpmp, struct mrq_debugfs_request req = { .cmd = cpu_to_le32(CMD_DEBUGFS_READ), .fop = { - .fnameaddr = cpu_to_le32((uint32_t)name), - .fnamelen = cpu_to_le32((uint32_t)sz_name), - .dataaddr = cpu_to_le32((uint32_t)data), - .datalen = cpu_to_le32((uint32_t)sz_data), + .fnameaddr = cpu_to_le32((u32)name), + .fnamelen = cpu_to_le32((u32)sz_name), + .dataaddr = cpu_to_le32((u32)data), + .datalen = cpu_to_le32((u32)sz_data), }, }; struct mrq_debugfs_response resp; @@ -534,10 +534,10 @@ static int mrq_debugfs_write(struct tegra_bpmp *bpmp, const struct mrq_debugfs_request req = { .cmd = cpu_to_le32(CMD_DEBUGFS_WRITE), .fop = { - .fnameaddr = cpu_to_le32((uint32_t)name), - .fnamelen = cpu_to_le32((uint32_t)sz_name), - .dataaddr = cpu_to_le32((uint32_t)data), - .datalen = cpu_to_le32((uint32_t)sz_data), + .fnameaddr = cpu_to_le32((u32)name), + .fnamelen = cpu_to_le32((u32)sz_name), + .dataaddr = cpu_to_le32((u32)data), + .datalen = cpu_to_le32((u32)sz_data), }, }; struct tegra_bpmp_message msg = { @@ -557,8 +557,8 @@ static int mrq_debugfs_dumpdir(struct tegra_bpmp *bpmp, dma_addr_t addr, const struct mrq_debugfs_request req = { .cmd = cpu_to_le32(CMD_DEBUGFS_DUMPDIR), .dumpdir = { - .dataaddr = cpu_to_le32((uint32_t)addr), - .datalen = cpu_to_le32((uint32_t)size), + .dataaddr = cpu_to_le32((u32)addr), + .datalen = cpu_to_le32((u32)size), }, }; struct mrq_debugfs_response resp; @@ -695,10 +695,10 @@ static const struct file_operations debugfs_fops = { }; static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf, - struct dentry *parent, uint32_t depth) + struct dentry *parent, u32 depth) { int err; - uint32_t d, t; + u32 d, t; const char *name; struct dentry *dentry;